{"_id":"@isaacs/ttlcache","_rev":"4402368","name":"@isaacs/ttlcache","description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","dist-tags":{"latest":"2.1.4"},"maintainers":[{"name":"isaacs","email":""}],"time":{"modified":"2026-04-08T12:17:02.000Z","created":"2022-04-07T19:11:40.814Z","2.1.4":"2025-12-29T19:21:30.427Z","2.1.3":"2025-11-26T07:05:13.027Z","2.1.2":"2025-11-19T00:53:10.176Z","2.1.1":"2025-11-07T03:50:41.255Z","2.1.0":"2025-11-07T03:36:58.012Z","2.0.1":"2025-10-26T20:53:48.764Z","2.0.0":"2025-10-25T18:42:07.396Z","1.4.1":"2023-07-01T17:27:15.442Z","1.4.0":"2023-05-04T03:20:04.181Z","1.3.0":"2023-05-04T03:02:16.442Z","1.2.2":"2023-03-23T08:00:44.423Z","1.2.1":"2022-10-13T22:17:41.453Z","1.2.0":"2022-08-03T20:42:14.896Z","1.1.0":"2022-06-30T23:08:27.551Z","1.0.5":"2022-06-22T00:21:47.645Z","1.0.4":"2022-06-14T16:49:40.522Z","1.0.3":"2022-04-19T23:49:59.428Z","1.0.2":"2022-04-07T20:34:03.942Z","1.0.1":"2022-04-07T19:48:09.151Z","1.0.0":"2022-04-07T19:11:40.814Z"},"users":{},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"versions":{"2.1.4":{"name":"@isaacs/ttlcache","version":"2.1.4","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"devDependencies":{"@types/node":"^25.0.3","prettier":"^3.7.4","tap":"^21.5.0","tshy":"^3.1.0","typedoc":"^0.28.15"},"engines":{"node":">=12"},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","gitHead":"1476f929f84c9bc2b64e20167126dab42317aff9","_id":"@isaacs/ttlcache@2.1.4","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_nodeVersion":"24.4.1","_npmVersion":"11.6.3","dist":{"shasum":"c90f02f927088b8588f5bc61ecfbdf16e804dfd8","size":13524,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-2.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-2.1.4.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ttlcache_2.1.4_1767036090272_0.06766709326986642"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-12-29T19:21:30.427Z","publish_time":1767036090427,"_source_registry_name":"default","_cnpm_publish_time":1767036090427},"2.1.3":{"name":"@isaacs/ttlcache","version":"2.1.3","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"devDependencies":{"@tapjs/clock":"^3.0.2","@types/node":"^24.9.1","prettier":"^3.6.2","tap":"^21.1.1","tshy":"^3.0.3","typedoc":"^0.28.14","typescript":"^5.9.3"},"engines":{"node":">=12"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","tap":{"plugin":["@tapjs/clock"]},"gitHead":"4d5e71d5ba72400c2743485452ecb5d83599c21d","_id":"@isaacs/ttlcache@2.1.3","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_nodeVersion":"24.4.1","_npmVersion":"11.6.3","dist":{"shasum":"b5da3615f0a22e7687779afd899dd8f44cc36602","size":13583,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-2.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-2.1.3.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ttlcache_2.1.3_1764140712841_0.2995247657522444"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-11-26T07:05:13.027Z","publish_time":1764140713027,"_source_registry_name":"default","_cnpm_publish_time":1764140713027},"2.1.2":{"name":"@isaacs/ttlcache","version":"2.1.2","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"devDependencies":{"@tapjs/clock":"^3.0.2","@types/node":"^24.9.1","prettier":"^3.6.2","tap":"^21.1.1","tshy":"^3.0.3","typedoc":"^0.28.14","typescript":"^5.9.3"},"engines":{"node":">=12"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","tap":{"plugin":["@tapjs/clock"]},"gitHead":"6e15c53905f6c340a3d06494c776c30a68e65ff9","_id":"@isaacs/ttlcache@2.1.2","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_nodeVersion":"24.4.1","_npmVersion":"11.6.2","dist":{"shasum":"63f0b897382df54412ab9c9a178107b67ed73c2b","size":13583,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-2.1.2.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ttlcache_2.1.2_1763513589897_0.46468487094855715"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-11-19T00:53:10.176Z","publish_time":1763513590176,"_source_registry_name":"default","_cnpm_publish_time":1763513590176},"2.1.1":{"name":"@isaacs/ttlcache","version":"2.1.1","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"devDependencies":{"@tapjs/clock":"^3.0.2","@types/node":"^24.9.1","prettier":"^3.6.2","tap":"^21.1.1","tshy":"^3.0.3","typedoc":"^0.28.14","typescript":"^5.9.3"},"engines":{"node":">=12"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","tap":{"plugin":["@tapjs/clock"]},"_id":"@isaacs/ttlcache@2.1.1","gitHead":"4a5bdb25c5182b3678c1cb74a1c9bdc49709a47d","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"shasum":"60f940f427088d5553cc373577bcfbba33a7333e","size":13561,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-2.1.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ttlcache_2.1.1_1762487441073_0.9549316180600298"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-11-07T03:50:41.255Z","publish_time":1762487441255,"_source_registry_name":"default","_cnpm_publish_time":1762487441255},"2.1.0":{"name":"@isaacs/ttlcache","version":"2.1.0","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"devDependencies":{"@tapjs/clock":"^3.0.2","@types/node":"^24.9.1","prettier":"^3.6.2","tap":"^21.1.1","tshy":"^3.0.3","typedoc":"^0.28.14","typescript":"^5.9.3"},"engines":{"node":">=12"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","tap":{"plugin":["@tapjs/clock"]},"_id":"@isaacs/ttlcache@2.1.0","gitHead":"76e144d48d06695a51ba47ce902ff32c9154cc15","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"shasum":"ea249f2f545953c4688e9e1067fb0d549545be43","size":13165,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-2.1.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ttlcache_2.1.0_1762486617812_0.4018107092263967"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-11-07T03:36:58.012Z","publish_time":1762486618012,"_source_registry_name":"default","_cnpm_publish_time":1762486618012},"2.0.1":{"name":"@isaacs/ttlcache","version":"2.0.1","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"devDependencies":{"@tapjs/clock":"^3.0.2","@types/node":"^24.9.1","prettier":"^3.6.2","tap":"^21.1.1","tshy":"^3.0.3","typedoc":"^0.28.14","typescript":"^5.9.3"},"engines":{"node":">=12"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","tap":{"plugin":["@tapjs/clock"]},"_id":"@isaacs/ttlcache@2.0.1","gitHead":"b56ba66fd0af2fbb3665166545f596b23a28918e","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"shasum":"aa3fbd0ba0d715e754845237b827f8e9e323f038","size":11864,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-2.0.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ttlcache_2.0.1_1761512027871_0.7924310058777635"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-26T20:53:48.764Z","publish_time":1761512028764,"_source_registry_name":"default","_cnpm_publish_time":1761512028764},"2.0.0":{"name":"@isaacs/ttlcache","version":"2.0.0","main":"./dist/commonjs/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"devDependencies":{"@tapjs/clock":"^3.0.2","@types/node":"^24.9.1","prettier":"^3.6.2","tap":"^21.1.1","tshy":"^3.0.3","typedoc":"^0.28.14","typescript":"^5.9.3"},"engines":{"node":">=12"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","tap":{"plugin":["@tapjs/clock"]},"_id":"@isaacs/ttlcache@2.0.0","gitHead":"6f369f0ef877ff4d89554432277a194959ed46ee","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"shasum":"135f35677d3296ae43afd142ea9b704365c14e2b","size":11934,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-2.0.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ttlcache_2.0.0_1761417727181_0.8404521092757349"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-25T18:42:07.396Z","publish_time":1761417727396,"_source_registry_name":"default","_cnpm_publish_time":1761417727396},"1.4.1":{"name":"@isaacs/ttlcache","version":"1.4.1","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1","typescript":"^4.7.3"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"gitHead":"716c4d72eb5105a99422edc1e8a180bd1452826d","types":"./index.d.ts","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.4.1","_nodeVersion":"18.16.0","_npmVersion":"9.7.2","dist":{"shasum":"21fb23db34e9b6220c6ba023a0118a2dd3461ea2","size":8167,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.4.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.4.1_1688232435181_0.2891137710674845"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-07-01T17:27:15.442Z","publish_time":1688232435442,"_source_registry_name":"default","_cnpm_publish_time":1688232435442},"1.4.0":{"name":"@isaacs/ttlcache","version":"1.4.0","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1","typescript":"^4.7.3"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"types":"./index.d.ts","gitHead":"000b9b1ae4e50e5c7f44c3082aeab832adce5134","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.4.0","_nodeVersion":"18.16.0","_npmVersion":"9.6.5","dist":{"shasum":"b993aeb3ee5015ae5dfc7b7960dd9b0fb5b1a7fc","size":8119,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.4.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.4.0_1683170404016_0.5813724238609836"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-04T03:20:04.181Z","publish_time":1683170404181,"_source_registry_name":"default","_cnpm_publish_time":1683170404181},"1.3.0":{"name":"@isaacs/ttlcache","version":"1.3.0","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1","typescript":"^4.7.3"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"types":"./index.d.ts","gitHead":"b8bd43fafbf30020309ddde337e15b586a13c6c7","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.3.0","_nodeVersion":"18.16.0","_npmVersion":"9.6.5","dist":{"shasum":"1074f90ebd21b33e3b940563683b0b1f022000ba","size":7744,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.3.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.3.0_1683169336281_0.6891705227097031"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-04T03:02:16.442Z","publish_time":1683169336442,"_source_registry_name":"default","_cnpm_publish_time":1683169336442},"1.2.2":{"name":"@isaacs/ttlcache","version":"1.2.2","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1","typescript":"^4.7.3"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"types":"./index.d.ts","gitHead":"8d84863c6437b349149122b90d5352764ddcbb2c","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.2.2","_nodeVersion":"18.14.0","_npmVersion":"9.5.1","dist":{"shasum":"2c3bc9cbfdbf999046c58a22fd17c0b8e4ffba19","size":7429,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.2.2.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.2.2_1679558444260_0.9611688350101206"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-03-23T08:00:44.423Z","publish_time":1679558444423,"_cnpm_publish_time":1679558444423},"1.2.1":{"name":"@isaacs/ttlcache","version":"1.2.1","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1","typescript":"^4.7.3"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"types":"./index.d.ts","gitHead":"c2c08c60e5ce04d3cf816555a5714b0c5022026d","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.2.1","_nodeVersion":"18.4.0","_npmVersion":"8.13.2","dist":{"shasum":"07f54e31ee2dde9f0d2608fe3707f358596825e2","size":7413,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.2.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.2.1_1665699461281_0.053421315164038585"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-10T02:22:42.240Z","publish_time":1665699461453,"_cnpm_publish_time":1665699461453},"1.2.0":{"name":"@isaacs/ttlcache","version":"1.2.0","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1","typescript":"^4.7.3"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"types":"./index.d.ts","gitHead":"2c4e77bea38ee05109ba8a9274df441aa2adb000","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.2.0","_nodeVersion":"18.4.0","_npmVersion":"8.13.2","dist":{"shasum":"75a0adb256cdf011bbc275a653e8a1e4c7f235ed","size":6999,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.2.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.2.0_1659559334661_0.7344652662774251"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-08-03T20:53:11.598Z","publish_time":1659559334896,"_cnpm_publish_time":1659559334896},"1.1.0":{"name":"@isaacs/ttlcache","version":"1.1.0","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1","typescript":"^4.7.3"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"types":"./index.d.ts","gitHead":"af9a39a70107e0b8f6db7714edec56dc88c99ce6","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.1.0","_nodeVersion":"18.4.0","_npmVersion":"8.13.2","dist":{"shasum":"a50f17d241921df8182881bd487ac22f35827eed","size":6394,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.1.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.1.0_1656630507412_0.4907105989491778"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-01T11:51:59.470Z","publish_time":1656630507551,"_cnpm_publish_time":1656630507551},"1.0.5":{"name":"@isaacs/ttlcache","version":"1.0.5","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1","typescript":"^4.7.3"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"types":"./index.d.ts","gitHead":"de8bb3cfee3f810f3adfccae3f33b9a3aad63002","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.0.5","_nodeVersion":"18.4.0","_npmVersion":"8.12.1","dist":{"shasum":"bdb965ea396a26c5377520dcc8fbcb82377355d5","size":6437,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.0.5.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.0.5_1655857307448_0.26473488381741683"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-06-22T00:24:25.577Z","publish_time":1655857307645,"_cnpm_publish_time":1655857307645},"1.0.4":{"name":"@isaacs/ttlcache","version":"1.0.4","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"@types/node":"^17.0.42","@types/tap":"^15.0.7","clock-mock":"^1.0.6","prettier":"^2.7.0","tap":"^16.0.1","ts-node":"^10.8.1"},"engines":{"node":">=12"},"tap":{"nyc-arg":["--include=index.js"],"node-arg":["--require","ts-node/register"],"ts":false},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"types":"./index.d.ts","gitHead":"e9db860e67d90a8386994254c4a38970fd6a7047","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.0.4","_nodeVersion":"18.2.0","_npmVersion":"8.9.0","dist":{"shasum":"22d38a73b5eb05a4e5b448bd417423245ec7df66","size":5072,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.0.4.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.0.4_1655225380340_0.011705559598000237"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-06-14T17:15:06.485Z","publish_time":1655225380522,"_cnpm_publish_time":1655225380522},"1.0.3":{"name":"@isaacs/ttlcache","version":"1.0.3","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"clock-mock":"^1.0.4","tap":"^16.0.1"},"engines":{"node":">=12"},"gitHead":"db3f8da48f069242e4739c625ff6c01a6486a8f6","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.0.3","_nodeVersion":"17.6.0","_npmVersion":"8.5.3","dist":{"shasum":"1046ef350521fcb644903dd49917adb7de17cda4","size":4855,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.0.3.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.0.3_1650412199307_0.7799944844890758"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-19T23:50:04.385Z","publish_time":1650412199428,"_cnpm_publish_time":1650412199428},"1.0.2":{"name":"@isaacs/ttlcache","version":"1.0.2","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"clock-mock":"^1.0.4","tap":"^16.0.1"},"engines":{"node":">=12"},"gitHead":"ee2f5491a988399bbadcc3b3cc19adc76c5f371e","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.0.2","_nodeVersion":"17.6.0","_npmVersion":"8.5.3","dist":{"shasum":"acbf88eced551b7e3735090c6a10fa100739b055","size":4841,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.0.2.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.0.2_1649363643559_0.3098132997659091"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-07T20:37:36.627Z","publish_time":1649363643942,"_cnpm_publish_time":1649363643942},"1.0.1":{"name":"@isaacs/ttlcache","version":"1.0.1","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"clock-mock":"^1.0.4","tap":"^16.0.1"},"engines":{"node":">=12"},"gitHead":"4b370d269f7c8e013f1b586fd59a435f6f9c0545","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.0.1","_nodeVersion":"17.6.0","_npmVersion":"8.5.3","dist":{"shasum":"00939e4cc545c018358495e6fafcccc8e75ec107","size":4049,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.0.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.0.1_1649360889045_0.2591811838821658"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-07T19:48:22.020Z","publish_time":1649360889151,"_cnpm_publish_time":1649360889151},"1.0.0":{"name":"@isaacs/ttlcache","version":"1.0.0","main":"index.js","exports":{".":"./index.js"},"description":"The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)","repository":{"type":"git","url":"git+https://github.com/isaacs/ttlcache.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"devDependencies":{"clock-mock":"^1.0.4","tap":"^16.0.1"},"engines":{"node":">=12"},"gitHead":"73acc3808c7b786bcd04ec87d2cf73396933bc4c","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"homepage":"https://github.com/isaacs/ttlcache#readme","_id":"@isaacs/ttlcache@1.0.0","_nodeVersion":"17.6.0","_npmVersion":"8.5.3","dist":{"shasum":"9733bb718a3f2713bec14d7f4cdc4aa48b6f9fb4","size":4054,"noattachment":false,"key":"/@isaacs/ttlcache/-/@isaacs/ttlcache-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@isaacs/ttlcache/download/@isaacs/ttlcache-1.0.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ttlcache_1.0.0_1649358700650_0.7643136492617593"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-07T19:28:23.273Z","publish_time":1649358700814,"_cnpm_publish_time":1649358700814}},"readme":"# @isaacs/ttlcache\n\nThe time-based use-recency-unaware cousin of\n[`lru-cache`](http://npm.im/lru-cache)\n\n## Usage\n\nEssentially, this is the same API as\n[`lru-cache`](http://npm.im/lru-cache), but it does not do LRU tracking,\nand is bound primarily by time, rather than space. Since entries are not\npurged based on recency of use, it can save a lot of extra work managing\nlinked lists, mapping keys to pointers, and so on.\n\nTTLs are millisecond granularity.\n\nIf a capacity limit is set, then the soonest-expiring items are purged\nfirst, to bring it down to the size limit.\n\nIteration is in order from soonest expiring until latest expiring.\n\nIf multiple items are expiring in the same ms, then the soonest-added\nitems are considered \"older\" for purposes of iterating and purging down to\ncapacity.\n\nA TTL _must_ be set for every entry, which can be defaulted in the\nconstructor.\n\nCustom size calculation is not supported. Max capacity is simply the count\nof items in the cache.\n\n```js\nimport { TTLCache } from '@isaacs/ttlcache'\nconst cache = new TTLCache({ max: 10000, ttl: 1000 })\n\n// set some value\ncache.set(1, 2)\n\n// 999 ms later\ncache.has(1) // returns true\ncache.get(1) // returns 2\n\n// 1000 ms later\ncache.get(1) // returns undefined\ncache.has(1) // returns false\n```\n\n## Caveat Regarding Timers and Graceful Exits\n\nOn Node.js, this module uses the `Timeout.unref()` method to\nprevent its internal `setTimeout` calls from keeping the process\nrunning indefinitely. However, on other systems such as Deno,\nwhere the `setTimeout` method does not return an object with an\n`unref()` method, the process will stay open as long as any\nunexpired entry exists in the cache.\n\nYou may call `cache.cancelTimer()` to clear the timeout and\nallow the process to exit normally. Be advised that canceling the\ntimer in this way will of course prevent anything from expiring.\n\n## API\n\n### `const { TTLCache } = require('@isaacs/ttlcache')` or `import TTLCache from '@isaacs/ttlcache'`\n\nThe `TTLCache` class is a named export.\n\n### `new TTLCache({ ttl, max = Infinty, updateAgeOnGet = false, checkAgeOnGet = false, noUpdateTTL = false, noDisposeOnSet = false })`\n\nCreate a new `TTLCache` object.\n\n- `max` The max number of items to keep in the cache. Must be\n  positive integer or `Infinity`, defaults to `Infinity` (ie,\n  limited only by TTL, not by item count).\n- `ttl` The max time in ms to store items. Overridable on the `set()`\n  method. Must be a positive integer or `Infinity` (see note\n  below about immortality hazards). If `undefined` in\n  constructor, then a TTL _must_ be provided in each `set()`\n  call.\n- `updateAgeOnGet` Should the age of an item be updated when it is\n  retrieved? Defaults to `false`. Overridable on the `get()` method.\n- `checkAgeOnGet` Check the TTL whenever an item is retrieved\n  with `get()`. If the item is past its ttl, but the timer has\n  not yet fired, then delete it and return undefined. By default,\n  the cache will return a value if it has one, even if it is\n  technically beyond its TTL.\n- `noUpdateTTL` Should setting a new value for an existing key leave the\n  TTL unchanged? Defaults to `false`. Overridable on the `set()` method.\n  (Note that TTL is _always_ updated if the item is expired, since that is\n  treated as a new `set()` and the old item is no longer relevant.)\n- `dispose` Method called with `(value, key, reason)` when an item is\n  removed from the cache. Called once item is fully removed from cache.\n  It is safe to re-add at this point, but note that adding when `reason` is\n  `'set'` can result in infinite recursion if `noDisponseOnSet` is not\n  specified.\n\n  Disposal reasons:\n  - `'stale'` TTL expired.\n  - `'set'` Overwritten with a new different value.\n  - `'evict'` Removed from the cache to stay within capacity limit.\n  - `'delete'` Explicitly deleted with `cache.delete()` or\n    `cache.clear()`\n\n- `noDisposeOnSet` Do not call `dispose()` method when overwriting a key\n  with a new value. Defaults to `false`. Overridable on `set()` method.\n\nWhen used as an iterator, like `for (const [key, value] of cache)` or\n`[...cache]`, the cache yields the same results as the `entries()` method.\n\n### `cache.size`\n\nThe number of items in the cache.\n\n### `cache.set(key, value, { ttl, noUpdateTTL, noDisposeOnSet } = {})`\n\nStore a value in the cache for the specified time.\n\n`ttl` and `noUpdateTTL` optionally override defaults on the constructor.\n\nReturns the cache object.\n\n### `cache.get(key, {updateAgeOnGet, checkAgeOnGet, ttl} = {})`\n\nGet an item stored in the cache. Returns `undefined` if the item is not in\nthe cache (including if it has expired and been purged).\n\nIf `updateAgeOnGet` is `true`, then re-add the item into the\ncache with the updated `ttl` value. All options default to the\nsettings on the constructor.\n\nIf `checkAgeOnGet`, then an item will be deleted if it is found\nto be beyond its TTL, which can happen if the setTimeout timer\nhas not yet fired to trigger its expiration.\n\nNote that using `updateAgeOnGet` _can_ effectively simulate a\n\"least-recently-used\" type of algorithm, by repeatedly updating\nthe TTL of items as they are used. However, if you find yourself\ndoing this, consider using\n[`lru-cache`](http://npm.im/lru-cache), as it is much more\noptimized for an LRU use case.\n\n### `cache.getRemainingTTL(key)`\n\nReturn the remaining time before an item expires. Returns `0` if the item\nis not found in the cache or is already expired.\n\n### `cache.has(key)`\n\nReturn true if the item is in the cache.\n\n### `cache.delete(key)`\n\nRemove an item from the cache.\n\n### `cache.clear()`\n\nDelete all items from the cache.\n\n### `cache.entries()`\n\nReturn an iterator that walks through each `[key, value]` from soonest\nexpiring to latest expiring. (Items expiring at the same time are walked\nin insertion order.)\n\nDefault iteration method for the cache object.\n\n### `cache.keys()`\n\nReturn an iterator that walks through each `key` from soonest expiring to\nlatest expiring.\n\n### `cache.values()`\n\nReturn an iterator that walks through each `value` from soonest expiring to\nlatest expiring.\n\n### `cache.cancelTimer()`\n\nClear the internal timer, and stop automatically expiring items\nwhen their TTL expires.\n\nThis allows the process to exit normally on Deno and other\nplatforms that lack Node's `Timer.unref()` method.\n\n## Internal Methods\n\nYou should not ever call these, they are managed automatically.\n\n### `purgeStale`\n\n**Internal**\n\nRemoves items which have expired. Called automatically.\n\n### `purgeToCapacity`\n\n**Internal**\n\nRemoves soonest-expiring items when the capacity limit is reached. Called\nautomatically.\n\n### `dispose`\n\n**Internal**\n\nCalled when an item is removed from the cache and should be disposed. Set\nthis on the constructor options.\n\n### `setTimer`\n\n**Internal**\n\nCalled when an item with a ttl is added. This ensures that only one timer\nis setup at once. Called automatically.\n\n## Algorithm\n\nThe cache uses two `Map` objects. The first maps item keys to their\nexpiration time, and the second maps item keys to their values. Then, a\nnull-prototype object uses the expiration time as keys, with the value\nbeing an array of all the keys expiring at that time.\n\nThis leverages a few important features of modern JavaScript engines for\nfairly good performance:\n\n- `Map` objects are highly optimized for referring to arbitrary values by\n  arbitrary keys.\n- Objects with solely integer-numeric keys are iterated in sorted numeric\n  order rather than insertion order, and insertions in the middle of the\n  key ordering are still very fast. This is true of all modern JS engines\n  tested at the time of this module's creation, but most particularly V8\n  (the engine in Node.js).\n\nWhen it is time to prune, we can always walk the null-prototype object in\niteration order, deleting items until we come to the first key greater than\nthe current time.\n\nThus, the `start` time doesn't need to be tracked, only the expiration\ntime. When an item age is updated (either explicitly on `get()`, or by\nsetting to a new value), it is deleted and re-inserted.\n\n## Immortality Hazards\n\nIt is possible to set a TTL of `Infinity`, in which case an item\nwill never expire. As it does not expire, its TTL is not\ntracked, and `getRemainingTTL()` will return `Infinity` for that\nkey.\n\nIf you do this, then the item will never be purged. Create\nenough immortal values, and the cache will grow to consume all\navailable memory. If find yourself doing this, it's _probably_\nbetter to use a different data structure, such as a `Map` or\nplain old object to store values, as it will have better\nperformance and the hazards will be more obvious.\n","_attachments":{},"homepage":"https://github.com/isaacs/ttlcache#readme","bugs":{"url":"https://github.com/isaacs/ttlcache/issues"},"license":"BlueOak-1.0.0"}