{"_id":"@unkey/cache","_rev":"11-79c612dcd8fc1c977c92fcf0c1e7b1dc","name":"@unkey/cache","dist-tags":{"latest":"1.5.0"},"versions":{"0.0.2":{"name":"@unkey/cache","version":"0.0.2","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"MIT","_id":"@unkey/cache@0.0.2","maintainers":[{"name":"domeccleston","email":"domeccleston@gmail.com"},{"name":"perkinsjr","email":"james@jamesperkins.dev"},{"name":"chronark","email":"dev@chronark.com"}],"homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"2b6471645014962fc5de7fca427558af08f924fc","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-0.0.2.tgz","fileCount":10,"integrity":"sha512-mHu+6urrJb1p2AxqkyfqLliuoRPCBiPA9geJXrlp8FtlIrkTWE7hT8b/dP3nFRw3QgM1/oxmaNmOmeVue9fYLg==","signatures":[{"sig":"MEUCIQCD+NGxowbYZuJ4nMzz3Bo+EA7/yyZmXaQZVYGyT2xgyQIgRES69BE5YFE+CuK4ZgLKAYZsjqiuaG9oJ1WvWSljUPc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1172807},"main":"./dist/index.js","_from":"file:unkey-cache-0.0.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","private":false,"scripts":{"build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/c42a1592585f976250670f262d582802/unkey-cache-0.0.2.tgz","_integrity":"sha512-mHu+6urrJb1p2AxqkyfqLliuoRPCBiPA9geJXrlp8FtlIrkTWE7hT8b/dP3nFRw3QgM1/oxmaNmOmeVue9fYLg==","_npmVersion":"10.5.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.12.2","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.0.1","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.3","tsup":"^8.0.2","typescript":"^5.3.3","@types/node":"^20.11.28"},"_npmOperationalInternal":{"tmp":"tmp/cache_0.0.2_1714402216680_0.5091531720292404","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@unkey/cache","version":"0.0.3","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"AGPL-3.0","_id":"@unkey/cache@0.0.3","maintainers":[{"name":"domeccleston","email":"domeccleston@gmail.com"},{"name":"perkinsjr","email":"james@jamesperkins.dev"},{"name":"chronark","email":"dev@chronark.com"}],"homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"bb02d10348a877c1d1b82c33a35d4d1e8ce2e21c","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-0.0.3.tgz","fileCount":10,"integrity":"sha512-DUy8y4WviATvWCNfutU9UWsz9QgpRkv20Gt6kZ5xY7keDNOXR3t5tWhfZ5P60+7pIflrMLWRGNIY+GE6vMQjGQ==","signatures":[{"sig":"MEUCIQCJeEUtJMrIKP+I3KtWr7CG0PzYWnWu09q1mYAytZEkdwIgUKa4uMEbQn7m71d4YU9n4cbm4oZJNnv9HZtMLRHC8nE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142106},"main":"./dist/index.js","_from":"file:unkey-cache-0.0.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/72421a3bc22789af084cb2e6617d3a7d/unkey-cache-0.0.3.tgz","_integrity":"sha512-DUy8y4WviATvWCNfutU9UWsz9QgpRkv20Gt6kZ5xY7keDNOXR3t5tWhfZ5P60+7pIflrMLWRGNIY+GE6vMQjGQ==","_npmVersion":"10.5.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.12.2","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.0.2","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.3","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.3.3","@types/node":"^20.11.28"},"_npmOperationalInternal":{"tmp":"tmp/cache_0.0.3_1715441278205_0.3955763438835209","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@unkey/cache","version":"1.0.0","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"AGPL-3.0","_id":"@unkey/cache@1.0.0","maintainers":[{"name":"domeccleston","email":"domeccleston@gmail.com"},{"name":"perkinsjr","email":"james@jamesperkins.dev"},{"name":"chronark","email":"dev@chronark.com"}],"homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"df29763667370aa7ff51d60ae8e8d0f9335aebeb","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-1.0.0.tgz","fileCount":26,"integrity":"sha512-IY/ZlLK+riFsyj4ZGNaaXwfEwWj5ztXJPQJE+MRBjSqsYdbcRXxJ+/hXs681jNR4YX/RhCja4GFp9PvUmOqdnw==","signatures":[{"sig":"MEUCIQDWPm/o8Mpio6huvjMslsKjZHV12S4PjcLRmrlWKE8sswIgIZ3TQupQuQo3R7ttUIyH5DX2xxrAQKuaIbXwYuz06sA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":176953},"main":"./dist/index.js","_from":"file:unkey-cache-1.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./stores":{"types":"./dist/stores.d.ts","import":"./dist/stores.mjs","require":"./dist/stores.js"},"./middleware":{"types":"./dist/middleware.d.ts","import":"./dist/middleware.mjs","require":"./dist/middleware.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/a511813833626563cf1db2264e517c4c/unkey-cache-1.0.0.tgz","_integrity":"sha512-IY/ZlLK+riFsyj4ZGNaaXwfEwWj5ztXJPQJE+MRBjSqsYdbcRXxJ+/hXs681jNR4YX/RhCja4GFp9PvUmOqdnw==","_npmVersion":"10.7.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.14.0","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.0.2","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.4","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.3.3","@types/node":"^20.11.28"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.0.0_1718788340568_0.37205153841976535","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@unkey/cache","version":"1.0.1","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"AGPL-3.0","_id":"@unkey/cache@1.0.1","homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"d4290c5f839213d841a86e5a0a61c0bd490adbed","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-1.0.1.tgz","fileCount":26,"integrity":"sha512-8ZlQ3nuWgInqHgY34zYSi2wZ+ftNk3qGQBDvE7NstksMMu/+cv4fSw5dlb2t2DHx5U60rqjoMj5n7OJD9054yw==","signatures":[{"sig":"MEYCIQCELYgLP8bFPkVVSTVB2cVDtbyO5qbB5TeNG1XFMt//qAIhAMg7znB4iVbN/x7ucJv42kxzKK7XjtBM7ejWfQWSHSZM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":176993},"main":"./dist/index.js","_from":"file:unkey-cache-1.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./stores":{"types":"./dist/stores.d.ts","import":"./dist/stores.mjs","require":"./dist/stores.js"},"./middleware":{"types":"./dist/middleware.d.ts","import":"./dist/middleware.mjs","require":"./dist/middleware.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/private/var/folders/5s/m_5gmz1x3gz4t02_bmmtj07h0000gn/T/35d29bb94c4ee5aed1c246dfaf360d7a/unkey-cache-1.0.1.tgz","_integrity":"sha512-8ZlQ3nuWgInqHgY34zYSi2wZ+ftNk3qGQBDvE7NstksMMu/+cv4fSw5dlb2t2DHx5U60rqjoMj5n7OJD9054yw==","_npmVersion":"10.5.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.12.2","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.0.2","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.4","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.3.3","@types/node":"^20.11.28"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.0.1_1719412825418_0.8278401500146164","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@unkey/cache","version":"1.0.2","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"AGPL-3.0","_id":"@unkey/cache@1.0.2","homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"d6e3548bd3fe8a34cfeed223f5e78b1d0cf1bfa5","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-1.0.2.tgz","fileCount":26,"integrity":"sha512-c7ZkAn55FpckYCzc2Ib1G//zKbBEcBKHg/ZkVazzE34kiQEsNhWp3d0jtAR8B56SB02bM6bduOkAbZKLrPkLlg==","signatures":[{"sig":"MEYCIQCh/1e0TvIf1ENP00RgAXamQfFHQxXrey5qP/xJuYch3AIhAJyBfSL2ggOYgLnexLGEPCqwqIIxZFU9SYABjg1mZ+3Z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":177065},"main":"./dist/index.js","_from":"file:unkey-cache-1.0.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./stores":{"types":"./dist/stores.d.ts","import":"./dist/stores.mjs","require":"./dist/stores.js"},"./middleware":{"types":"./dist/middleware.d.ts","import":"./dist/middleware.mjs","require":"./dist/middleware.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/81f1a646c362d4734a1dbc101c831619/unkey-cache-1.0.2.tgz","_integrity":"sha512-c7ZkAn55FpckYCzc2Ib1G//zKbBEcBKHg/ZkVazzE34kiQEsNhWp3d0jtAR8B56SB02bM6bduOkAbZKLrPkLlg==","_npmVersion":"10.7.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.15.0","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.0.2","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.4","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.3.3","@types/node":"^20.11.28"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.0.2_1719423070458_0.17900982688070055","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@unkey/cache","version":"1.1.0","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"AGPL-3.0","_id":"@unkey/cache@1.1.0","maintainers":[{"name":"domeccleston","email":"domeccleston@gmail.com"},{"name":"perkinsjr","email":"james@jamesperkins.dev"},{"name":"chronark","email":"dev@chronark.com"}],"homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"cbb4371f57d0c5ba8e1c9cd8e52935e4a519b6d0","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-1.1.0.tgz","fileCount":26,"integrity":"sha512-JSTVdzbg7QZNNeFTo8pVy4z56b3KMEHcq+2PstdIZkD5f8+iA8njlTQ0AuAa1tlKGRRjOHHa2BbnAojLJatZkg==","signatures":[{"sig":"MEUCIHGqVTf5v1++ghkqFPSoa6d/o5qp3sOebZ8NdAr0DC5aAiEAuJPxnXIVJ52ucywBO9NzqZl0cgkAp8MJiPfi8Ja6cF8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143619},"main":"./dist/index.js","_from":"file:unkey-cache-1.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./stores":{"types":"./dist/stores.d.ts","import":"./dist/stores.mjs","require":"./dist/stores.js"},"./middleware":{"types":"./dist/middleware.d.ts","import":"./dist/middleware.mjs","require":"./dist/middleware.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/3e077b8c3bb0f50bb06c869418c44189/unkey-cache-1.1.0.tgz","_integrity":"sha512-JSTVdzbg7QZNNeFTo8pVy4z56b3KMEHcq+2PstdIZkD5f8+iA8njlTQ0AuAa1tlKGRRjOHHa2BbnAojLJatZkg==","_npmVersion":"10.7.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.15.0","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.1.0","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.4","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.3.3","@types/node":"^20.14.9"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.1.0_1719942099459_0.1777098140926583","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@unkey/cache","version":"1.2.0","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"MIT","_id":"@unkey/cache@1.2.0","maintainers":[{"name":"domeccleston","email":"domeccleston@gmail.com"},{"name":"perkinsjr","email":"james@jamesperkins.dev"},{"name":"chronark","email":"dev@chronark.com"}],"homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"f7664a67bb6741a022726385e199974f4440cc1b","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-1.2.0.tgz","fileCount":26,"integrity":"sha512-zNZkD8LL+7jhq1va1jvz60pLvFsSk0DDCpemYWCL2UyLU3QDDyMZcGofvhPdeMHpwKRU7Wpz5rwY6+WhpRuvOA==","signatures":[{"sig":"MEYCIQCPS/hQIwAAkOfIxFNIELrgGbv5E+oftEzZYIb6WUweYgIhALNAO1x8LRRZg3lD1IiZd86m6jysX6j6OzII+rCkIlYX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143614},"main":"./dist/index.js","_from":"file:unkey-cache-1.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./stores":{"types":"./dist/stores.d.ts","import":"./dist/stores.mjs","require":"./dist/stores.js"},"./middleware":{"types":"./dist/middleware.d.ts","import":"./dist/middleware.mjs","require":"./dist/middleware.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/710f6320efe5e4e57ec7f016f7ce78b8/unkey-cache-1.2.0.tgz","_integrity":"sha512-zNZkD8LL+7jhq1va1jvz60pLvFsSk0DDCpemYWCL2UyLU3QDDyMZcGofvhPdeMHpwKRU7Wpz5rwY6+WhpRuvOA==","_npmVersion":"10.7.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.15.0","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.2.0","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.4","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.3.3","@types/node":"^20.14.9"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.2.0_1719944050716_0.2519456612466642","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@unkey/cache","version":"1.3.0","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"MIT","_id":"@unkey/cache@1.3.0","maintainers":[{"name":"domeccleston","email":"domeccleston@gmail.com"},{"name":"perkinsjr","email":"james@jamesperkins.dev"},{"name":"chronark","email":"dev@chronark.com"}],"homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"541895556fa299271b204fb1cd18c265893889d6","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-1.3.0.tgz","fileCount":26,"integrity":"sha512-Ek2i+hLHxNw2BtvfmkbZwSykUpoqnUNd6mMLLUWX3erUWnVVivXszm3gN555s6os9TzTcm8PHvxDnJZmTPztaA==","signatures":[{"sig":"MEUCIDI9OBryAbVqV+1oJ0p7+8lPHuPAJ06jXzwEY1c+ZoStAiEA2lCcWG+/Rn1kFry1MEiWsCZkWgsi+XOJl9KEU0bNyBc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150664},"main":"./dist/index.js","_from":"file:unkey-cache-1.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./stores":{"types":"./dist/stores.d.ts","import":"./dist/stores.mjs","require":"./dist/stores.js"},"./middleware":{"types":"./dist/middleware.d.ts","import":"./dist/middleware.mjs","require":"./dist/middleware.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/b4173b3381d560c0e399b46ed6fbe4b0/unkey-cache-1.3.0.tgz","_integrity":"sha512-Ek2i+hLHxNw2BtvfmkbZwSykUpoqnUNd6mMLLUWX3erUWnVVivXszm3gN555s6os9TzTcm8PHvxDnJZmTPztaA==","_npmVersion":"10.7.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.15.0","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.2.0","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.4","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.5.3","@types/node":"^20.14.9","@upstash/redis":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.3.0_1720187720726_0.39916698969062314","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@unkey/cache","version":"1.4.0","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"MIT","_id":"@unkey/cache@1.4.0","maintainers":[{"name":"domeccleston","email":"domeccleston@gmail.com"},{"name":"perkinsjr","email":"james@jamesperkins.dev"},{"name":"chronark","email":"dev@chronark.com"}],"homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"8ea1eb5d857c3a2afd949b9bb659027e9c92d7cd","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-1.4.0.tgz","fileCount":26,"integrity":"sha512-NsT++Ygs5MV5JDgi71enHFdOYiuG5UWB6xRo+4f+VCfkcitJ1bQLIsBEGfZ8vmta41+LhuppRyuR6yemOKS8dw==","signatures":[{"sig":"MEYCIQCRortyCLiVYNtvnQfxdHplfGX6rLbjBkKxoQwbZT5uQwIhAJdCj+XJRi/vB1LQvCihXuI11X0yL0dwVvMLWfoKMPQs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168738},"main":"./dist/index.js","_from":"file:unkey-cache-1.4.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./stores":{"types":"./dist/stores.d.ts","import":"./dist/stores.mjs","require":"./dist/stores.js"},"./middleware":{"types":"./dist/middleware.d.ts","import":"./dist/middleware.mjs","require":"./dist/middleware.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/4c43e8c3f2071534f55e28746ec8b760/unkey-cache-1.4.0.tgz","_integrity":"sha512-NsT++Ygs5MV5JDgi71enHFdOYiuG5UWB6xRo+4f+VCfkcitJ1bQLIsBEGfZ8vmta41+LhuppRyuR6yemOKS8dw==","_npmVersion":"10.7.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.15.1","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.2.0","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.4","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.5.3","@types/node":"^20.14.9","@libsql/client":"^0.7.0","@upstash/redis":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.4.0_1721290179612_0.8949126150849607","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@unkey/cache","version":"1.5.0","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"MIT","_id":"@unkey/cache@1.5.0","maintainers":[{"name":"domeccleston","email":"domeccleston@gmail.com"},{"name":"perkinsjr","email":"james@jamesperkins.dev"},{"name":"chronark","email":"dev@chronark.com"}],"homepage":"https://github.com/unkeyed/unkey#readme","bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"dist":{"shasum":"0849d31fbdc8fb19208f2c327774b3360ad02752","tarball":"https://registry.npmjs.org/@unkey/cache/-/cache-1.5.0.tgz","fileCount":26,"integrity":"sha512-vqGk9qH3Hn1Nva3hGAaib6G3IcrPkRQ1VgyMFG7asuANZ0RtohONd9RwxXwlaDopJJ66Dsx5rWrV4s/3U1GADg==","signatures":[{"sig":"MEYCIQCcLguJRcdOSCWf3LTeUU6G+MxNWVCLL/AT1F9QI6eUEAIhAPAKSwcsStGeVTMerxmMFjg4kovd2TL2+7b9sxQ5UkbZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":174474},"main":"./dist/index.js","_from":"file:unkey-cache-1.5.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./stores":{"types":"./dist/stores.d.ts","import":"./dist/stores.mjs","require":"./dist/stores.js"},"./middleware":{"types":"./dist/middleware.d.ts","import":"./dist/middleware.mjs","require":"./dist/middleware.js"}},"private":false,"scripts":{"test":"vitest run","build":"tsup"},"_npmUser":{"name":"chronark","email":"dev@chronark.com"},"_resolved":"/tmp/f8488fe2731532fd25978d87a647047e/unkey-cache-1.5.0.tgz","_integrity":"sha512-vqGk9qH3Hn1Nva3hGAaib6G3IcrPkRQ1VgyMFG7asuANZ0RtohONd9RwxXwlaDopJJ66Dsx5rWrV4s/3U1GADg==","_npmVersion":"10.7.0","description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","directories":{},"_nodeVersion":"20.15.1","dependencies":{"superjson":"^2.2.1","@unkey/error":"^0.2.0","@opentelemetry/api":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"next":"^14.1.4","tsup":"^8.0.2","vitest":"^1.6.0","typescript":"^5.5.3","@types/node":"^20.14.9","@libsql/client":"^0.7.0","@upstash/redis":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cache_1.5.0_1722459235910_0.1055486444343472","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-04-29T14:50:16.553Z","modified":"2026-02-03T13:47:07.390Z","0.0.2":"2024-04-29T14:50:16.965Z","0.0.3":"2024-05-11T15:27:58.370Z","1.0.0":"2024-06-19T09:12:20.751Z","1.0.1":"2024-06-26T14:40:25.595Z","1.0.2":"2024-06-26T17:31:10.620Z","1.1.0":"2024-07-02T17:41:39.636Z","1.2.0":"2024-07-02T18:14:11.014Z","1.3.0":"2024-07-05T13:55:20.862Z","1.4.0":"2024-07-18T08:09:39.820Z","1.5.0":"2024-07-31T20:53:56.076Z"},"bugs":{"url":"https://github.com/unkeyed/unkey/issues"},"author":{"name":"Andreas Thomas","email":"andreas@unkey.dev"},"license":"MIT","homepage":"https://github.com/unkeyed/unkey#readme","keywords":["unkey","cache","cloudflare","tiered","swr","memory","latency"],"description":"<div align=\"center\">     <h1 align=\"center\">@unkey/cache</h1>     <h5>Cache all the things</h5> </div>","maintainers":[{"email":"dev@chronark.com","name":"chronark"},{"email":"james@jamesperkins.dev","name":"perkinsjr"}],"readme":"<div align=\"center\">\n    <h1 align=\"center\">@unkey/cache</h1>\n    <h5>Cache all the things</h5>\n</div>\n\n<div align=\"center\">\n  <a href=\"https://unkey.com/docs/libraries/ts/cache/overview\">Documentation</a>\n</div>\n<br/>\n\nBattle-tested, strongly typed caching with metrics and tracing out of the box.\n\n## Features\n\n- Tiered caching\n- Memory Cache\n- Cloudflare Cache\n- Cloudflare KV (todo)\n- Cloudflare R2 (todo)\n- Emit metrics\n\n## Quickstart\n\n```bash\nnpm install @unkey/cache\n```\n\n```ts\nimport {\n  createCache, DefaultStatefulContext } from \"@unkey/cache\";\nimport { MemoryStore, CloudflareStore } from \"@unkey/cache/stores\";\n\n\n// Only required in stateful environments.\n// Cloudflare workers or Vercel provide an executionContext for you.\nconst ctx = new DefaultStatefulContext();\n\ntype User = {\n  id: string;\n  email: string;\n};\n\ntype Post = {\n  slug: string;\n  title: string;\n  content: string;\n  publishedAt: Date;\n};\n\nconst fresh = 60_000;\nconst stale = 900_000;\n\nconst ctx = new DefaultStatefulContext();\n\nconst memory = new MemoryStore({\n  persistentMap: new Map(),\n});\n\nconst cloudflare = new CloudflareStore({\n  cloudflareApiKey: \"CLOUDFLARE_API_KEY\",\n  zoneId: \"CLOUDFLARE_ZONE_ID\",\n  domain: \"my-domain-on-cloudflare\",\n});\nconst cache = createCache({\n  account: new Namespace<Account>(ctx, {\n    stores: [memory],\n    fresh,\n    stale,\n  }),\n  user: new Namespace<User>(ctx, {\n    stores: [memory, cloudflare],\n    fresh,\n    stale,\n  }),\n});\n\nawait cache.user.set(\"chronark\", { id: \"chronark\", email: \"iykyk\" });\n\n// This is fully typesafe and will check the stores in the above defined order.\nconst user = await cache.user.get(\"chronark\");\n```\n\n### Stale while revalidate with origin refresh\n\nAdd your database query and the cache will return the stale data while revalidating the data in the background.\n\n```ts\nconst user = await cache.user.swr(\"chronark\", async (id) => {\n  return await db.query.users.findFirst({\n    where: (table, { eq }) => eq(table.id, id),\n  });\n});\n```\n\n\n### Documentation\n\n[Read the full documentation](https://unkey.com/docs/libraries/ts/cache/overview)","readmeFilename":"README.md"}