{"_id":"@pantheon-systems/nextjs-cache-handler","_rev":"14-a565649e4dda66b9feb404e1b56cca19","name":"@pantheon-systems/nextjs-cache-handler","dist-tags":{"latest":"0.11.0"},"versions":{"0.1.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.1.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.1.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"kevinstubbs_pantheon","email":"kevin.stubbs@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"d43752e77c9b299722cbc90b8ed3d799a2a5ad4c","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.1.0.tgz","fileCount":54,"integrity":"sha512-m1GALq8e1Wp7oLrPa97mr1JncWiZPmyQZQm2ElHDmnXtQhOtTI6YO8OkXU/aaqgdTkfxjLTxD6CaMDDyrt2eWQ==","signatures":[{"sig":"MEUCIE6+4pXljffnaOvWCZN3AAa6QFl6mZLwUrnFIH4OGg01AiEAvEyXXTknGzH/fqDU6WB2flWmrr6srMHA9wcfmLM9cZE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":167383},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c3e83a19f706e2ac3900b1157b4220669df3a7d2","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"danishyasin33","email":"danishyasin33@gmail.com"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"10.9.3","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@google-cloud/storage":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.1.0_1770242539216_0.19717202747606422","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.2.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.2.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"kevinstubbs_pantheon","email":"kevin.stubbs@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"a87266cc4c7efebae162582bf3de2899c49cfdcf","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.2.0.tgz","fileCount":98,"integrity":"sha512-0JtcgDUjaTFnjYohs7WHl0AX206FljEehqnFkg9VfPXDelOshNHzoEm8p5k6GqIkHP5dDQYOKtpbDFXVAtZB4Q==","signatures":[{"sig":"MEUCIQCRUK3Ai6x3GwRaeOmF5dkao1lRzS6xG/cT8plACeuYxwIgJk5wVKO0PfZjiGEKtq5JrY0UW1VAE94whU9TfuCBRC8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":297902},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./utils":{"types":"./dist/utils/index.d.ts","import":"./dist/utils/index.js"},"./use-cache":{"types":"./dist/use-cache/index.d.ts","import":"./dist/use-cache/index.js"},"./middleware":{"types":"./dist/middleware/index.d.ts","import":"./dist/middleware/index.js"}},"gitHead":"3b8253bf45f5373c2aa722e45243471ac41379dd","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","prepare":"npm run build","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"10.9.2","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@google-cloud/storage":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.6","vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.2.0_1771003260617_0.10529581704652125","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.3.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.3.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"kevinstubbs_pantheon","email":"kevin.stubbs@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"38f503b5b9820dcb2682222e16b35d799f2af1a1","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.3.0.tgz","fileCount":98,"integrity":"sha512-wQT+dCZq0SUV1oksBz38Y5Ly3fYfWWo4ETOVpYTGIwSosFSYmv+pFYIzBHbzVaK0hYOlVaXOe/iwymtkCfPkzA==","signatures":[{"sig":"MEUCIQCxH/ut2RPtaaXG2W17alWE6ClKMpdKgS4MJqsqR1Do6AIgT1SyefYap5SOyPgc2M0Z0Yp+6wwbDPj+6fvNazlgNqg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":298650},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./utils":{"types":"./dist/utils/index.d.ts","import":"./dist/utils/index.js"},"./use-cache":{"types":"./dist/use-cache/index.d.ts","import":"./dist/use-cache/index.js"},"./middleware":{"types":"./dist/middleware/index.d.ts","import":"./dist/middleware/index.js"}},"gitHead":"4905c4fc4e8865f07e018f2883b3c42378b3dd3d","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","prepare":"npm run build","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"10.9.2","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@google-cloud/storage":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.6","vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.3.0_1771533475811_0.45012271778790214","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.4.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.4.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"kevinstubbs_pantheon","email":"kevin.stubbs@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"be4478b770847d7bf973f65160db21bdcfe9b51d","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.4.0.tgz","fileCount":98,"integrity":"sha512-pbB2KK2iAH+O4fQTuo1OHjnnWn6iu5RLyB5fGe/2JoI+36NF+gNyC8kYqYSJVVB9LVZ97s6KZzXl+yDVsMZcqA==","signatures":[{"sig":"MEYCIQDXx3zX9ausSJH6LDIUGuLPc7BR2u1dnt76jytymKGligIhAKQGD8Wy/hU+ZbEue+OCJthzOO/KOWgVQsRAmWPTl6Xt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":275598},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./use-cache":{"types":"./dist/use-cache/index.d.ts","import":"./dist/use-cache/index.js"}},"gitHead":"8a1effe8d0ade9932ac96fb06ee25e7dc380f32d","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","prepare":"npm run build","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"10.9.2","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@google-cloud/storage":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.6","vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.4.0_1771892608676_0.37570975196235334","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.5.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.5.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"kevinstubbs_pantheon","email":"kevin.stubbs@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"81fc697c97d6e7dfe6ec28fc8b12dbeb50bcf96b","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.5.0.tgz","fileCount":98,"integrity":"sha512-Dra9otODGDMXnNrmWYpNtOM/LTA0HW+Rr2D1cYv4w6MDAI9QKIz2OA/HRV1x/EA5q6jr96NrnG0FveUjr1YAiQ==","signatures":[{"sig":"MEQCIAPBZCZxT+ua+TNhOvDVCz0nH+E5/n72/wr1Wd4gVUO6AiBdVlFb6WIVc4LZnGI7AutvEYqn1fQh2WJHGAeuQrRkwg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":278155},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./use-cache":{"types":"./dist/use-cache/index.d.ts","import":"./dist/use-cache/index.js"}},"gitHead":"2617555f11b533538a9960c934c40b6c87afee62","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","prepare":"npm run build","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"10.9.2","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@google-cloud/storage":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.6","vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.5.0_1772649221592_0.8627471748903233","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.6.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.6.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"kevinstubbs_pantheon","email":"kevin.stubbs@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"c12f1110d7ec891ef96683be4b11981837d6d6a6","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.6.0.tgz","fileCount":90,"integrity":"sha512-nsbqMzqNjIOdgEOBdaLbtBBEgVdSMg8bx0WxJlhvvr6Vklb+RXB2fG2k7kEAVNE81vjx9VpIUIB4DjgS6QByKA==","signatures":[{"sig":"MEUCIDH/BUPXiwp1QojT8nq6VTbBzac3yyIwPihqqSNI4MkTAiEAhzrHpKiGJa4P9RYkds6RM1xJQunXHK5VoGDSFkejRZo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":292104},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./use-cache":{"types":"./dist/handlers/use-cache/index.d.ts","import":"./dist/handlers/use-cache/index.js"}},"gitHead":"aa7e8da023fe945d097a6f71ac1adab2c0f10d90","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"danishyasin33","email":"danishyasin33@gmail.com"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"10.9.3","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@google-cloud/storage":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.6","vitest":"^4.0.18","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.6.0_1774378252011_0.393304948743209","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.7.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.7.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"kevinstubbs_pantheon","email":"kevin.stubbs@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"604e4265c4a749c6d7d28988487c11b7c1b1e22a","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.7.0.tgz","fileCount":90,"integrity":"sha512-T2nbKLYkJR5aWh38XRTmUEX0qejdFFQFpbADwxSNgmbmfqTAhvJ+tIe+VYpITgZ7PaA+yl3aPyprUaLif/HTPw==","signatures":[{"sig":"MEUCIQD6etV/DIm1UkuUVXEp1UABwjUZc13FjNn9CtlSD8UpqQIgNyuD7DRuePKtEqsmBWM/rQv7SdDyGe9KCStizJnXdbU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":292995},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./use-cache":{"types":"./dist/handlers/use-cache/index.d.ts","import":"./dist/handlers/use-cache/index.js"}},"gitHead":"e0b615c744102dc0114aba5688a004e5d4034a42","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"danishyasin33","email":"danishyasin33@gmail.com"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"10.9.3","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@google-cloud/storage":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.6","vitest":"^4.0.18","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.7.0_1775852435821_0.21226509594261267","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.8.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.8.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"89de9955983de2126eccb6be77b953eb4713d15d","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.8.0.tgz","fileCount":102,"integrity":"sha512-SYqmy9VUXX7CMd3wSOzZTneGafBfZMheEzRUPB2Fm6PBKj/QH1jyBkk+pUpCeqhxg9oML+n5Q49Xf8VzdbOYyQ==","signatures":[{"sig":"MEUCIEqpxtsCruLj8MxsC/IQ/O7tZRlFoG1hkv2ne6/+cc8yAiEA/ziQRc6xAvqONlURZUBVu0EwYrjf3V9Atm95FPV4ynA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314124},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","worker":"./dist/index.edge.js","browser":"./dist/index.edge.js","default":"./dist/index.js","workerd":"./dist/index.edge.js","edge-light":"./dist/index.edge.js"},"./use-cache":{"types":"./dist/handlers/use-cache/index.d.ts","import":"./dist/handlers/use-cache/index.js","worker":"./dist/handlers/use-cache/index.edge.js","browser":"./dist/handlers/use-cache/index.edge.js","default":"./dist/handlers/use-cache/index.js","workerd":"./dist/handlers/use-cache/index.edge.js","edge-light":"./dist/handlers/use-cache/index.edge.js"}},"gitHead":"25146dd5d44424fd2f49a3cfca567a80ab6e6938","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"danishyasin33","email":"danishyasin33@gmail.com"},"overrides":{"uuid":"^11.1.1","postcss":"^8.5.10","form-data":"2.5.6"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"11.16.0","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@google-cloud/storage":"^7.21.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.7","vitest":"^4.0.18","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^22","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.8.0_1783464547565_0.015139440589040376","host":"s3://npm-registry-packages-npm-production"}},"0.8.1":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.8.1","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.8.1","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"7f64604c896a983c602b50958a58b14341febafa","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.8.1.tgz","fileCount":102,"integrity":"sha512-knRWXeZ7sRc2/V5TCTG3rovD9aPUEL2+wyRopM4ZSnyYI9zGX7DqmoLexR0WomspFRZqA16SD32MgqzNJgWvSw==","signatures":[{"sig":"MEQCIHcS9b99s0XdO6f8JRx46t9qX6H1DOidBms/jAkTDEokAiAW+W409zPwjycsmSA2tUr1cnl3mBybwhg9RY8x4hXnGQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":320184},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","worker":"./dist/index.edge.js","browser":"./dist/index.edge.js","default":"./dist/index.js","workerd":"./dist/index.edge.js","edge-light":"./dist/index.edge.js"},"./use-cache":{"types":"./dist/handlers/use-cache/index.d.ts","import":"./dist/handlers/use-cache/index.js","worker":"./dist/handlers/use-cache/index.edge.js","browser":"./dist/handlers/use-cache/index.edge.js","default":"./dist/handlers/use-cache/index.js","workerd":"./dist/handlers/use-cache/index.edge.js","edge-light":"./dist/handlers/use-cache/index.edge.js"}},"gitHead":"c5041734ebe9ccca55828f6c51aff049bcf9ad87","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"danishyasin33","email":"danishyasin33@gmail.com"},"overrides":{"uuid":"^11.1.1","postcss":"^8.5.10","form-data":"2.5.6"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"11.16.0","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@google-cloud/storage":"^7.21.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.7","vitest":"^4.0.18","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^22","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.8.1_1784668192961_0.47194956317963865","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.9.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.9.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"861464672a07fbd7f32f7607ef6573fe2018158d","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.9.0.tgz","fileCount":102,"integrity":"sha512-XdCne7IOPsMrSQspC5DkgyAZE+6p4fuLvEAm0NwMrHN5IfHAAxT1Eau9GrUzedKVD8yGh7VDdafa0E3QHCXsRA==","signatures":[{"sig":"MEQCIHgTl9aOr1XJKpvzJ3aKGzYRn/xk0Hg5cWQ7+8gOzZ83AiApEitobIyM6yaset9ESl9xSiDqDob6SNhVDMEJPuUThw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":316630},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","worker":"./dist/index.edge.js","browser":"./dist/index.edge.js","default":"./dist/index.js","workerd":"./dist/index.edge.js","edge-light":"./dist/index.edge.js"},"./use-cache":{"types":"./dist/handlers/use-cache/index.d.ts","import":"./dist/handlers/use-cache/index.js","worker":"./dist/handlers/use-cache/index.edge.js","browser":"./dist/handlers/use-cache/index.edge.js","default":"./dist/handlers/use-cache/index.js","workerd":"./dist/handlers/use-cache/index.edge.js","edge-light":"./dist/handlers/use-cache/index.edge.js"}},"gitHead":"9756ed194416fa3987e707293ddb19a1033f1087","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"danishyasin33","email":"danishyasin33@gmail.com"},"overrides":{"uuid":"^11.1.1","postcss":"^8.5.10","form-data":"2.5.6"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"11.16.0","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@google-cloud/storage":"^7.21.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.7","vitest":"^4.0.18","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^22","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.9.0_1785362526199_0.0797346168021702","host":"s3://npm-registry-packages-npm-production"}},"0.11.0":{"name":"@pantheon-systems/nextjs-cache-handler","version":"0.11.0","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"author":{"name":"Pantheon Systems"},"license":"MIT","_id":"@pantheon-systems/nextjs-cache-handler@0.11.0","maintainers":[{"name":"pantheon-npm","email":"vendor-npm@pantheon.io"},{"name":"cobypear","email":"pear.coby@gmail.com"},{"name":"zzyou","email":"youzhenzhen@gmail.com"},{"name":"cat.kaethler","email":"cat.kaethler@pantheon.io"},{"name":"danishyasin33","email":"danishyasin33@gmail.com"},{"name":"duncanschouten","email":"duncan.s.schouten@gmail.com"},{"name":"mitchellmarkoff","email":"mitchell.markoff@pantheon.io"},{"name":"nickh_pantheon","email":"nickheinbaugh@pantheon.io"},{"name":"mel-miller","email":"me@mel-miller.com"}],"homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"dist":{"shasum":"1a72fa7d27e5dec6d38309477695235b3ecd1fe1","tarball":"https://registry.npmjs.org/@pantheon-systems/nextjs-cache-handler/-/nextjs-cache-handler-0.11.0.tgz","fileCount":102,"integrity":"sha512-9j+UeVbpzXR3pnldIWvrdPMA16vxNx0vRNhgZPBsWyk9M6DQMMohrLN3cihYKG2vWIyfHYxN/nrCz6e7JsBxGQ==","signatures":[{"sig":"MEQCIGN0kmMugU+gLJZBQn36/v3FDFyuRj0cMgkQkosaDLBsAiA/P983sJ7ko2f0MOKqCKEB9XRKr4Rl0THR3CtZdQ3arQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334006},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","worker":"./dist/index.edge.js","browser":"./dist/index.edge.js","default":"./dist/index.js","workerd":"./dist/index.edge.js","edge-light":"./dist/index.edge.js"},"./use-cache":{"types":"./dist/handlers/use-cache/index.d.ts","import":"./dist/handlers/use-cache/index.js","worker":"./dist/handlers/use-cache/index.edge.js","browser":"./dist/handlers/use-cache/index.edge.js","default":"./dist/handlers/use-cache/index.js","workerd":"./dist/handlers/use-cache/index.edge.js","edge-light":"./dist/handlers/use-cache/index.edge.js"}},"gitHead":"64a2da60b2d085f88e49812d31abda43bc44e204","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"npm run build","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"danishyasin33","email":"danishyasin33@gmail.com"},"overrides":{"uuid":"^11.1.1","sharp":"^0.35.0","postcss":"^8.5.10","form-data":"2.5.6"},"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"_npmVersion":"11.16.0","description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@google-cloud/storage":"^7.21.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^16.1.7","vitest":"^4.0.18","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^22","@vitest/coverage-v8":"^4.0.18"},"peerDependencies":{"next":">=14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-cache-handler_0.11.0_1787176185317_0.3810830889756791","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-02-04T22:02:19.112Z","modified":"2026-09-03T15:24:31.454Z","0.1.0":"2026-02-04T22:02:19.383Z","0.2.0":"2026-02-13T17:21:00.808Z","0.3.0":"2026-02-19T20:37:55.948Z","0.4.0":"2026-02-24T00:23:28.842Z","0.5.0":"2026-03-04T18:33:41.730Z","0.6.0":"2026-03-24T18:50:52.160Z","0.7.0":"2026-04-10T20:20:36.037Z","0.8.0":"2026-07-07T22:49:07.744Z","0.8.1":"2026-07-21T21:09:53.101Z","0.9.0":"2026-07-29T22:02:06.339Z","0.11.0":"2026-08-19T21:49:45.439Z"},"bugs":{"url":"https://github.com/pantheon-systems/nextjs-cache-handler/issues"},"author":{"name":"Pantheon Systems"},"license":"MIT","homepage":"https://github.com/pantheon-systems/nextjs-cache-handler#readme","keywords":["next.js","cache","cache-handler","gcs","google-cloud-storage","pantheon"],"repository":{"url":"git+https://github.com/pantheon-systems/nextjs-cache-handler.git","type":"git"},"description":"Custom cache handler for Next.js with support for Google Cloud Storage and file-based caching","maintainers":[{"email":"vendor-npm@pantheon.io","name":"pantheon-npm"},{"email":"youzhenzhen@gmail.com","name":"zzyou"},{"email":"cat.kaethler@pantheon.io","name":"cat.kaethler"},{"email":"danishyasin33@gmail.com","name":"danishyasin33"},{"email":"duncan.s.schouten@gmail.com","name":"duncanschouten"},{"email":"mitchell.markoff@pantheon.io","name":"mitchellmarkoff"},{"email":"nickheinbaugh@pantheon.io","name":"nickh_pantheon"},{"email":"me@mel-miller.com","name":"mel-miller"}],"readme":"# @pantheon-systems/nextjs-cache-handler\n\nCustom cache handler for Next.js with support for Google Cloud Storage and file-based caching. Designed for Pantheon's Next.js hosting platform.\n\n## Features\n\n- **Dual Cache Handlers**: Support for both GCS (production) and file-based (development) caching\n- **Next.js 16 `use cache` Support**: Handlers for the new `cacheHandlers` (plural) API\n- **Tag-Based Invalidation**: Efficient O(1) cache invalidation using tag mapping\n- **Edge Cache Clearing**: Automatic CDN cache invalidation on Pantheon infrastructure\n- **Build-Aware Caching**: Automatically invalidates route cache on new builds\n- **Static Route Preservation**: Preserves SSG routes during cache clearing\n- **Edge-Runtime Safe**: Ships an edge-safe entry (resolved via the `edge-light`/`worker` export conditions) so a globally-configured cache handler doesn't break edge routes or edge middleware\n\n## Installation\n\n```bash\nnpm install @pantheon-systems/nextjs-cache-handler\n```\n\n## Quick Start\n\n### 1. Create a cache handler file\n\n```typescript\n// cacheHandler.ts\nimport { createCacheHandler } from '@pantheon-systems/nextjs-cache-handler';\n\nconst CacheHandler = createCacheHandler({\n  type: 'auto', // Auto-detect: GCS if CACHE_BUCKET exists, else file-based\n});\n\nexport default CacheHandler;\n```\n\n### 2. Configure Next.js\n\n```javascript\n// next.config.mjs\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nconst nextConfig = {\n  cacheHandler: path.resolve(__dirname, \"./cacheHandler.mjs\"),\n  cacheMaxMemorySize: 0, // Disable in-memory caching to use custom handler\n};\n\nexport default nextConfig;\n```\n\n## Edge runtime safety\n\nThe GCS and file handlers are Node-only — they import `fs` and\n`@google-cloud/storage`. When a cache handler is configured **globally** (via\n`cacheHandler` / `cacheHandlers` in `next.config`, as Pantheon's build adapter\ndoes zero-touch), Next.js bundles it into **edge routes and edge middleware**\ntoo. If the entry point pulled in `fs`, those edge builds would fail with\n`edge runtime does not support Node.js 'fs'` (or `Can't resolve 'net'`).\n\nTo avoid that, the package ships a separate **edge-safe entry** exposing the same\nAPI backed by no-op handlers, and maps it through the `edge-light`, `worker`,\n`workerd`, and `browser` [export conditions](https://nodejs.org/api/packages.html#conditional-exports).\nNext's edge compiler resolves the edge-safe entry; the Node server resolves the\nreal handlers. No configuration is needed — importing `@pantheon-systems/nextjs-cache-handler`\njust works in both runtimes.\n\n> ⚠️ **Do not add this package to `transpilePackages`.** Transpiling a package\n> makes Next's edge compiler bundle its source and **ignore the `edge-light`\n> export condition**, which drags the Node handlers back into the edge bundle and\n> reintroduces the `fs`/`net` build failure. Leave it as a normal (externalized)\n> dependency.\n\nEdge routes/middleware never persist to the shared cache, so the edge no-op\nhandlers are correct: reads miss and writes are dropped at the edge, while the\nNode server performs real caching.\n\n## Configuration\n\n### `createCacheHandler(config?)`\n\nCreates a cache handler based on the provided configuration.\n\n```typescript\ninterface CacheHandlerConfig {\n  /**\n   * Handler type selection:\n   * - 'auto': Automatically detect based on environment (GCS if CACHE_BUCKET is set, otherwise file)\n   * - 'file': Use file-based caching (local development)\n   * - 'gcs': Use Google Cloud Storage (production/Pantheon)\n   */\n  type?: 'auto' | 'file' | 'gcs';\n}\n```\n\n> **Note:** Debug logging is controlled via the `CACHE_DEBUG` environment variable. See the [Debugging](#debugging) section for details.\n\n## Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `CACHE_BUCKET` | GCS bucket name for storing cache | Required for GCS handler |\n| `OUTBOUND_PROXY_ENDPOINT` | Edge cache proxy endpoint (Pantheon infrastructure) | Optional (enables edge cache clearing) |\n| `CACHE_DEBUG` | Enable debug logging (`true` or `1`) | Optional |\n\n## API Reference\n\n### `createCacheHandler(config?)`\n\nFactory function that returns the appropriate cache handler class based on configuration.\n\n```typescript\nimport { createCacheHandler } from '@pantheon-systems/nextjs-cache-handler';\n\n// Auto-detect based on environment\nconst CacheHandler = createCacheHandler();\n\n// Force file-based caching\nconst FileCacheHandler = createCacheHandler({ type: 'file' });\n\n// Force GCS caching\nconst GcsCacheHandler = createCacheHandler({ type: 'gcs' });\n```\n\n### `getSharedCacheStats()`\n\nReturns cache statistics for the current environment.\n\n```typescript\nimport { getSharedCacheStats } from '@pantheon-systems/nextjs-cache-handler';\n\nconst stats = await getSharedCacheStats();\nconsole.log(stats);\n// {\n//   size: 10,\n//   keys: ['fetch:abc123', 'route:_index'],\n//   entries: [\n//     { key: 'fetch:abc123', tags: ['posts'], type: 'fetch', lastModified: 1234567890 }\n//   ]\n// }\n```\n\n### `clearSharedCache()`\n\nClears all cache entries (preserving static SSG routes).\n\n```typescript\nimport { clearSharedCache } from '@pantheon-systems/nextjs-cache-handler';\n\nconst clearedCount = await clearSharedCache();\nconsole.log(`Cleared ${clearedCount} cache entries`);\n```\n\n### Direct Handler Access\n\nFor advanced use cases, you can import the handlers directly:\n\n```typescript\nimport { FileCacheHandler, GcsCacheHandler } from '@pantheon-systems/nextjs-cache-handler';\n\n// Use directly in your configuration\nexport default FileCacheHandler;\n```\n\n## Next.js 16 `use cache` Handlers\n\nNext.js 16 introduces the `'use cache'` directive with a new `cacheHandlers` (plural) configuration. This package provides handlers for it.\n\n### 1. Create a use-cache handler file\n\n`createUseCacheHandler` returns the handler **class**. Next.js's `cacheHandlers`\n(plural) API expects each entry's default export to be an **instance** with\ncallable `.get/.set/...` methods — Next does not call `new` on it. So you must\ninstantiate the class with `new` and export the instance:\n\n```typescript\n// use-cache-handler.mjs\nimport { createUseCacheHandler } from '@pantheon-systems/nextjs-cache-handler/use-cache';\n\nconst UseCacheHandler = createUseCacheHandler({\n  type: 'auto', // Auto-detect: GCS if CACHE_BUCKET exists, else file-based\n});\n\n// Note the `new` — Next.js calls methods directly on this exported value\n// and will not instantiate the class for you.\nexport default new UseCacheHandler();\n```\n\n> If you forget the `new`, Next.js builds will hang (~60s) and then fail\n> because `.get/.set/...` are undefined on the class itself.\n\n### 2. Configure Next.js\n\n```javascript\n// next.config.mjs\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nconst nextConfig = {\n  // Existing handler for ISR, routes, fetch cache\n  cacheHandler: path.resolve(__dirname, \"./cache-handler.mjs\"),\n\n  // Handler for 'use cache' directive\n  cacheHandlers: {\n    default: path.resolve(__dirname, \"./use-cache-handler.mjs\"),\n  },\n\n  cacheMaxMemorySize: 0,\n  cacheComponents: true,\n};\n\nexport default nextConfig;\n```\n\n### `createUseCacheHandler(config?)`\n\nFactory function that returns the appropriate use-cache handler. Accepts the same `type` option (`'auto'`, `'file'`, `'gcs'`).\n\n### `getUseCacheStats()`\n\nReturns statistics for `use cache` entries, similar to `getSharedCacheStats()`.\n\n```typescript\nimport { getUseCacheStats } from '@pantheon-systems/nextjs-cache-handler';\n\nconst stats = await getUseCacheStats();\n```\n\n### Direct Handler Access\n\n```typescript\nimport { UseCacheFileHandler, UseCacheGcsHandler } from '@pantheon-systems/nextjs-cache-handler';\n```\n\n## Cache Types\n\nThe handler distinguishes between two cache types:\n\n- **Fetch Cache**: Stores data from `fetch()` calls with caching enabled\n- **Route Cache**: Stores rendered pages and route data\n\n## Tag-Based Invalidation\n\nThe handler maintains a tag-to-keys mapping for efficient O(1) cache invalidation:\n\n```typescript\n// When setting cache with tags\nawait cacheHandler.set('post-1', data, { tags: ['posts', 'blog'] });\n\n// When invalidating by tag\nawait cacheHandler.revalidateTag('posts');\n// All entries tagged with 'posts' are invalidated\n```\n\n## Edge Cache Clearing\n\nWhen deployed on Pantheon, the cache handlers automatically clear the CDN edge cache when cache entries are invalidated. This is triggered by:\n\n- `revalidateTag()` calls (clears matching surrogate keys and paths)\n- `revalidatePath()` calls (clears the specific path from the CDN)\n\nEdge cache clearing is enabled when the `OUTBOUND_PROXY_ENDPOINT` environment variable is set (automatically configured on Pantheon). It runs in the background and does not block cache operations.\n\n## Build Invalidation\n\nOn each new build, the handler automatically:\n\n1. Detects the new build ID\n2. Invalidates the route cache (Full Route Cache)\n3. Preserves the data cache (Fetch Cache)\n\nThis matches Next.js's expected behavior where route cache is invalidated on each deploy but data cache persists.\n\n## Debugging\n\nEnable debug logging to see detailed cache operations by setting the `CACHE_DEBUG` environment variable:\n\n```bash\n# Enable debug logging\nCACHE_DEBUG=true npm run start\n\n# Or\nCACHE_DEBUG=1 npm run start\n```\n\n### Log Levels\n\nThe cache handler uses four log levels:\n\n| Level | When Shown | Use Case |\n|-------|------------|----------|\n| `debug` | Only when `CACHE_DEBUG=true` | Verbose operational logs (GET, SET, HIT, MISS) |\n| `info` | Only when `CACHE_DEBUG=true` | Important events (initialization, cache cleared) |\n| `warn` | Always | Recoverable issues that might need attention |\n| `error` | Always | Errors that affect cache operations |\n\n### Example Output\n\nWhen debug logging is enabled, you'll see output like:\n\n```\n[GcsCacheHandler] Initializing cache handler\n[GcsCacheHandler] GET: /api/posts\n[GcsCacheHandler] HIT: /api/posts (route)\n[GcsCacheHandler] SET: /api/users (fetch)\n[EdgeCacheClear] Cleared 3 paths in 45ms\n[GcsCacheHandler] Revalidated 5 entries for tags: posts, blog\n```\n\nThis helps diagnose cache behavior, verify cache hits/misses, and troubleshoot invalidation issues.\n\n## Publishing\n\n### Prerequisites\n\n1. Ensure you're logged into npm with access to the `@pantheon-systems` scope:\n   ```bash\n   npm login --scope=@pantheon-systems\n   ```\n\n2. Verify your login:\n   ```bash\n   npm whoami\n   ```\n\n### Publishing Steps\n\n1. **Update the version** in `package.json`:\n   ```bash\n   # Patch release (0.1.0 -> 0.1.1)\n   npm version patch\n\n   # Minor release (0.1.0 -> 0.2.0)\n   npm version minor\n\n   # Major release (0.1.0 -> 1.0.0)\n   npm version major\n   ```\n\n2. **Build and test**:\n   ```bash\n   npm run build\n   npm test\n   ```\n\n3. **Publish to npm**:\n   ```bash\n   npm publish --access public\n   ```\n\n   The `--access public` flag is required for scoped packages to be publicly accessible.\n\n### Verify Publication\n\nAfter publishing, verify the package is available:\n```bash\nnpm view @pantheon-systems/nextjs-cache-handler\n```\n\nOr install it in a test project:\n```bash\nnpm install @pantheon-systems/nextjs-cache-handler\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}