next-on-pages suspense cache KV not being populated

Hi all! We've added a KV binding to support the persistance of the next.js suspense cache as described at: https://github.com/cloudflare/next-on-pages/blob/502b4cd03f1d215972b4c9916e608ada28dba067/packages/next-on-pages/docs/caching.md#workers-kv:
[[kv_namespaces]]
binding = "__NEXT_ON_PAGES__KV_SUSPENSE_CACHE"
id = "OUR_ID_HERE"
[[kv_namespaces]]
binding = "__NEXT_ON_PAGES__KV_SUSPENSE_CACHE"
id = "OUR_ID_HERE"
We are using the sanity CMS and don't see any response being cache, which is odd. So I tried calling thw following simple API:
const request = await fetch('https://httpbin.org/get', {
cache: 'force-cache',
});
const request = await fetch('https://httpbin.org/get', {
cache: 'force-cache',
});
And also for this request it seems like nothing was cached as my KV folder is empty (see screenshot). Am I doing something wrong? version: - next: 14.2.3 - next-on-pages: 1.12.1
GitHub
next-on-pages/packages/next-on-pages/docs/caching.md at 502b4cd03f1...
CLI to build and develop Next.js apps for Cloudflare Pages - cloudflare/next-on-pages
No description
5 Replies
Eminent
Eminent5mo ago
Yeah, it doesn't work as expected. Does it require a bit more because of Sanity?
jdruwe
jdruweOP5mo ago
@Eminent It's broken for me in every scenario, even for the simple query above. Is that one working for you?
Eminent
Eminent5mo ago
Revalidation doesn't work at all for me.
jdruwe
jdruweOP5mo ago
Did you use their command to generate the Repo? I setup mine manually in a monorepo not sure of it's related to the next version Also seems to be failing in the Cloudflare nextjs preset project when running wrangler pages dev I also log incoming API requests (mock rest server) and I can see a request coming in for each page refresh.
jdruwe
jdruweOP5mo ago
GitHub
[🐛 Bug]: Workers KV for caching fetch requests is not working · Iss...
next-on-pages environment related information System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 CPU...
Want results from more Discord servers?
Add your server