caches not found for next on pages
I'm following the cache guide to implement caching with NextJS, however I'm getting
caches is not defined
inside my route handler. What's the correct way to access the cache API in Next? And is this expected to work locally?
3 Replies
is this in next dev specifically?
Yes, just now I tested it in a preview build and it worked! @Better James do you happen to know the default TTL of caching this way? Is it 1 hour on Pro? https://developers.cloudflare.com/cache/how-to/edge-browser-cache-ttl/
Cloudflare Docs
Edge and Browser Cache TTL · Cloudflare Cache (CDN) docs
Edge Cache TTL (Time to Live) specifies the maximum time to cache a resource in the Cloudflare global network. Edge Cache TTL is not visible in …
Not sure