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:
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:
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
5 Replies
Yeah, it doesn't work as expected. Does it require a bit more because of Sanity?
@Eminent It's broken for me in every scenario, even for the simple query above. Is that one working for you?
Revalidation doesn't work at all for me.
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.Created an issue at: https://github.com/cloudflare/next-on-pages/issues/844
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...