kql cf-cache-status: DYNAMIC #25
-
Hi, As a first time Cloudflare user I want to leverage the greatness of their cache-layer. For most of my content I get to see that the cf-chache-status is 'HIT'. However, only the Kql data seems to be be set to 'DYNAMIC'. I've already set up a hook in kibry to purge the cache when a page is updated/created/removed. I've been looking to many sources, but nothing that really helped me. I was wondering if you have a solution for this? The fetched data is pretty extensive sometimes… so the loading times are a bit of a pain to be honest. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
or is it in this case better to use pnpm run generate as build command on Cloudflare? I'm is that supported with this module? |
Beta Was this translation helpful? Give feedback.
-
That depends on your usecase. You can combine both. I recommend you read the Nuxt KQL Server Side Caching Guide. It explains how to use Cloudflare KV storage as the caching layer. Nuxt natively supports it, since its server Nitro uses unstroage. Of course you can also use For my projects, I generatlly tend to use the KV storage from Cloudflare, but for other projects with control over the build chain it makes sense to just pre-render the whole page and deploy to Cloudflare Pages. Check out my Cacao Kit, which is a best-practice Kirby Nuxt integration. The build pipeline of the repo build a server, but you can switch that to static generation easily. |
Beta Was this translation helpful? Give feedback.
That depends on your usecase. You can combine both.
I recommend you read the Nuxt KQL Server Side Caching Guide. It explains how to use Cloudflare KV storage as the caching layer. Nuxt natively supports it, since its server Nitro uses unstroage.
Of course you can also use
pnpm run generate
. Nuxt KQL provides a data fetching layer. If you want to pre-generate pages at build-time, it's completely up to you to do so.For my projects, I generatlly tend to use the KV storage from Cloudflare, but for other projects with control over the build chain it makes sense to just pre-render the whole page and deploy to Cloudflare Pages. Check out my Cacao Kit, which is a best-practice Kirby Nuxt integra…