{"_id":"@aliksend/cache","_rev":"6-ea568ba41d39c6db5163758f6a577ef7","name":"@aliksend/cache","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@aliksend/cache","version":"1.0.0","keywords":["cache"],"author":{"name":"Alik Send"},"license":"MIT","_id":"@aliksend/cache@1.0.0","maintainers":[{"name":"aliksend","email":"aliknoname@gmail.com"}],"homepage":"https://github.com/aliksend/node-packages#readme","bugs":{"url":"https://github.com/aliksend/node-packages/issues"},"dist":{"shasum":"352353b7707a130df1a3c695e48a73ef0f528f4d","tarball":"https://registry.npmjs.org/@aliksend/cache/-/cache-1.0.0.tgz","fileCount":43,"integrity":"sha512-qkXmZwlJBTFngn1mgM8Ptdzw6+oPPnG6c8aKbN8vwzf7bau5/KEjRIEG1QgMzC5abQsxbjkI8yM2OhgrEmoDQg==","signatures":[{"sig":"MEUCIALxJ0dz5i21BVjoVoPq8iDA7fnAUCY2NWy8+xCGL5VJAiEAlkRGObQk97K+jy2KRuGOvR6DxRlMvDFiioqII26ZwSU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37986},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./format/*":{"types":"./dist/format/*.d.ts","default":"./dist/format/*.js"},"./storage/*":{"types":"./dist/storage/*.d.ts","default":"./dist/storage/*.js"}},"gitHead":"cdab44850bf520b2d6401cf1197002e8c2e0bc0e","scripts":{"lint":"npx @aliksend/linter --fix","test":"node --import tsx --test ./src/*.test.ts","build":"rm -rf dist && tsc","test:coverage":"node --import tsx --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info --test ./src/*.test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"aliksend","email":"aliknoname@gmail.com"},"repository":{"url":"git+https://github.com/aliksend/node-packages.git","type":"git"},"_npmVersion":"10.9.0","description":"This module provides cache primitive with some implementations","directories":{},"_nodeVersion":"22.11.0","dependencies":{"dayjs":"^1.11.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.6.3","@types/node":"^22.8.4"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.0.0_1732266675779_0.4221032254666601","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@aliksend/cache","version":"1.0.1","keywords":["cache"],"author":{"name":"Alik Send"},"license":"MIT","_id":"@aliksend/cache@1.0.1","maintainers":[{"name":"aliksend","email":"aliknoname@gmail.com"}],"homepage":"https://github.com/aliksend/node-packages#readme","bugs":{"url":"https://github.com/aliksend/node-packages/issues"},"dist":{"shasum":"d2bd7ffdd2e2bc7aac60ddecd35dff99165ce7d4","tarball":"https://registry.npmjs.org/@aliksend/cache/-/cache-1.0.1.tgz","fileCount":39,"integrity":"sha512-ZAtekDTeaXz/5gpL3rmlH2Y/bJ3kqP4TPlStHjpLE+fUKu0j5XMHIrojovV0gwJt1nH96PNJBBhc/rY68mOBHg==","signatures":[{"sig":"MEYCIQCeySyCnpl/4qSQbRw7sRmDnUGj9qeqMKgnddBzqIbshQIhAJxZ/kErrPn+X7U4QEC2D1C0AhYhxYOCF2xlTaxT6uZL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27937},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./format/*":{"types":"./dist/format/*.d.ts","default":"./dist/format/*.js"},"./storage/*":{"types":"./dist/storage/*.d.ts","default":"./dist/storage/*.js"}},"gitHead":"cdab44850bf520b2d6401cf1197002e8c2e0bc0e","scripts":{"lint":"npx @aliksend/linter --fix","test":"node --import tsx --test ./src/*.test.ts","build":"rm -rf dist && tsc","test:coverage":"node --import tsx --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info --test ./src/*.test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"aliksend","email":"aliknoname@gmail.com"},"repository":{"url":"git+https://github.com/aliksend/node-packages.git","type":"git"},"_npmVersion":"10.9.0","description":"This module provides cache primitive with some implementations","directories":{},"_nodeVersion":"22.11.0","dependencies":{"dayjs":"^1.11.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.6.3","@types/node":"^22.8.4"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.0.1_1732299870602_0.3414721662518083","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@aliksend/cache","version":"1.0.2","keywords":["cache"],"author":{"name":"Alik Send"},"license":"MIT","_id":"@aliksend/cache@1.0.2","maintainers":[{"name":"aliksend","email":"aliknoname@gmail.com"}],"homepage":"https://github.com/aliksend/node-packages#readme","bugs":{"url":"https://github.com/aliksend/node-packages/issues"},"dist":{"shasum":"ea3e0211099dd3b9252d5a3d3c286ac174201652","tarball":"https://registry.npmjs.org/@aliksend/cache/-/cache-1.0.2.tgz","fileCount":39,"integrity":"sha512-r0AI9/r9i9k+tf1LaBz190NYl598I5mZLRNMqTpeL8+lpOJ04a5aDqNpVLtXsiNrKmzzBm9KrzhXYcB+ex9WKw==","signatures":[{"sig":"MEYCIQD5z61c5paI1d8uRExwXfjIFkrP2nTvpB1x9mSCcSq0vgIhAIvz6LwUJ7WXvwmwCfpyEqdP5fC53kn1QlRfEfwFersa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28044},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./format/*":{"types":"./dist/format/*.d.ts","default":"./dist/format/*.js"},"./storage/*":{"types":"./dist/storage/*.d.ts","default":"./dist/storage/*.js"}},"gitHead":"cdab44850bf520b2d6401cf1197002e8c2e0bc0e","scripts":{"lint":"npx @aliksend/linter --fix","test":"node --import tsx --test ./src/*.test.ts","build":"rm -rf dist && tsc","test:coverage":"node --import tsx --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info --test ./src/*.test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"aliksend","email":"aliknoname@gmail.com"},"repository":{"url":"git+https://github.com/aliksend/node-packages.git","type":"git"},"_npmVersion":"10.9.0","description":"This module provides cache primitive with some implementations","directories":{},"_nodeVersion":"22.11.0","dependencies":{"dayjs":"^1.11.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.6.3","@types/node":"^22.8.4"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.0.2_1732301705060_0.8578972510535101","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@aliksend/cache","version":"1.0.3","keywords":["cache"],"author":{"name":"Alik Send"},"license":"MIT","_id":"@aliksend/cache@1.0.3","maintainers":[{"name":"aliksend","email":"aliknoname@gmail.com"}],"homepage":"https://github.com/aliksend/node-packages#readme","bugs":{"url":"https://github.com/aliksend/node-packages/issues"},"dist":{"shasum":"91d6bc41fa2155d41d9eb1e26571ea546b77b0d4","tarball":"https://registry.npmjs.org/@aliksend/cache/-/cache-1.0.3.tgz","fileCount":39,"integrity":"sha512-1DMD/gj/cv0eJe6k4oVbNP1G1sMTRm7hRv9rHnxy/X9bRpDuDMckKb0OSAZW1E/uBQkJn3a3QVKt7H19eyEznw==","signatures":[{"sig":"MEUCIDV54mmvhW6HzXpFJO+A+oKPXs/LBt7TQsvCTjHZ/XtiAiEA2bUtfwsqhTtFHqpnjy10IdpvRzjBg28P8m30hFt2vOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28044},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./format/*":{"types":"./dist/format/*.d.ts","default":"./dist/format/*.js"},"./storage/*":{"types":"./dist/storage/*.d.ts","default":"./dist/storage/*.js"}},"gitHead":"cdab44850bf520b2d6401cf1197002e8c2e0bc0e","scripts":{"lint":"npx @aliksend/linter --fix","test":"node --import tsx --test ./src/*.test.ts","build":"rm -rf dist && tsc","test:coverage":"node --import tsx --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info --test ./src/*.test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"aliksend","email":"aliknoname@gmail.com"},"repository":{"url":"git+https://github.com/aliksend/node-packages.git","type":"git"},"_npmVersion":"10.9.0","description":"This module provides cache primitive with some implementations","directories":{},"_nodeVersion":"22.11.0","dependencies":{"dayjs":"^1.11.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.6.3","@types/node":"^22.8.4"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.0.3_1732336614005_0.9432174070961732","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@aliksend/cache","version":"1.0.4","keywords":["cache"],"author":{"name":"Alik Send"},"license":"MIT","_id":"@aliksend/cache@1.0.4","maintainers":[{"name":"aliksend","email":"aliknoname@gmail.com"}],"homepage":"https://github.com/aliksend/node-packages#readme","bugs":{"url":"https://github.com/aliksend/node-packages/issues"},"dist":{"shasum":"5b70360568fb47ccf79eb95a55fa0c3b62815b36","tarball":"https://registry.npmjs.org/@aliksend/cache/-/cache-1.0.4.tgz","fileCount":39,"integrity":"sha512-ww/1Y0KAOgMni6EVqpYUjtTzkhU8qZ2i3udAiHxUIplzgK5yzsvol6DyZlshL/ziJFcKGI5fEyGilqxzqffKBg==","signatures":[{"sig":"MEUCIDp9Q0VUzpBPl6YHEmu8G85oCWP9u6fdELI2wP8LrHX6AiEArx/56/TXdEnJgChWWhA5gm82sm19u4PDLQ9cfw35htY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28062},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./format/*":{"types":"./dist/format/*.d.ts","default":"./dist/format/*.js"},"./storage/*":{"types":"./dist/storage/*.d.ts","default":"./dist/storage/*.js"}},"gitHead":"cdab44850bf520b2d6401cf1197002e8c2e0bc0e","scripts":{"lint":"npx @aliksend/linter --fix","test":"node --import tsx --test ./src/*.test.ts","build":"rm -rf dist && tsc","test:coverage":"node --import tsx --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info --test ./src/*.test.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"aliksend","email":"aliknoname@gmail.com"},"repository":{"url":"git+https://github.com/aliksend/node-packages.git","type":"git"},"_npmVersion":"10.9.0","description":"This module provides cache primitive with some implementations","directories":{},"_nodeVersion":"22.11.0","dependencies":{"dayjs":"^1.11.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.6.3","@types/node":"^22.8.4"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.0.4_1732336773945_0.15828563750709956","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@aliksend/cache","version":"1.1.0","description":"This module provides cache primitive with some implementations","keywords":["cache"],"repository":{"type":"git","url":"git+https://github.com/aliksend/node-packages.git","directory":"./packages/cache"},"license":"MIT","author":{"name":"Alik Send"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./format/*":{"types":"./dist/format/*.d.ts","default":"./dist/format/*.js"},"./storage/*":{"types":"./dist/storage/*.d.ts","default":"./dist/storage/*.js"}},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rm -rf dist && tsc","lint":"npx @aliksend/linter --fix","prepublishOnly":"npm run build","test":"node --require ts-node/register --test ./src/*.test.ts"},"dependencies":{"dayjs":"^1.11.13"},"devDependencies":{"@types/node":"^22.8.4","tsx":"^4.19.2","typescript":"^5.6.3"},"publishConfig":{"access":"public"},"_id":"@aliksend/cache@1.1.0","gitHead":"26babedffa91075a624d14bdbe1f0b72c5dbc6bd","bugs":{"url":"https://github.com/aliksend/node-packages/issues"},"homepage":"https://github.com/aliksend/node-packages#readme","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-gbbEfZyxid6BAjt06PPxogD9q3sI6WghqgNb9CFL3lvocQcD3Ww+NI68Yx7VghxUMf8U0GbcBkNp3VlDvQYHaw==","shasum":"17bae2e6ead02d50532f311123024214141e8652","tarball":"https://registry.npmjs.org/@aliksend/cache/-/cache-1.1.0.tgz","fileCount":44,"unpackedSize":45259,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDHZpB5X2hELztFhUMRBevtt5k4Hq1PDkpGHdGnF7MepAIhAJ2h28ix/Fm61vgrMgXlseRmgihp7z3CMpjVVNQw99qo"}]},"_npmUser":{"name":"aliksend","email":"aliknoname@gmail.com"},"directories":{},"maintainers":[{"name":"aliksend","email":"aliknoname@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cache_1.1.0_1768362130159_0.1587899670654096"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-22T09:11:15.656Z","modified":"2026-01-14T03:42:10.711Z","1.0.0":"2024-11-22T09:11:15.967Z","1.0.1":"2024-11-22T18:24:30.774Z","1.0.2":"2024-11-22T18:55:05.239Z","1.0.3":"2024-11-23T04:36:54.201Z","1.0.4":"2024-11-23T04:39:34.126Z","1.1.0":"2026-01-14T03:42:10.299Z"},"bugs":{"url":"https://github.com/aliksend/node-packages/issues"},"author":{"name":"Alik Send"},"license":"MIT","homepage":"https://github.com/aliksend/node-packages#readme","keywords":["cache"],"repository":{"type":"git","url":"git+https://github.com/aliksend/node-packages.git","directory":"./packages/cache"},"description":"This module provides cache primitive with some implementations","maintainers":[{"name":"aliksend","email":"aliknoname@gmail.com"}],"readme":"# Cache\n\n```typescript\nimport { Cache } from './src';\nimport { MemoryStorage } from './src/storage/memory';\n\nconst storage = new MemoryStorage();\nconst cache = new Cache({ storage });\n\nconst cached = cache.cached('value', () => fetch('http://www.randomnumberapi.com/api/v1.0/random?count=5').then(r => r.json()))\n\nconsole.log(await cached())\nconsole.log(await cached())\nconsole.log(await cached())\n// same output three times\n\ncache.invalidate('value')\n\nconsole.log(await cached())\nconsole.log(await cached())\n// another output two times\n```\n","readmeFilename":"README.md"}