We’ve deployed a static site, assets and all - to a Cloudflare Pages site, hosted under our own domain of course.
A simple question - are any caching rules either effective or necessary for URL’s hosted on Cloudflare Pages?
I was confused about what would happen if we wanted to “Cache Everything” on assets that were already located (I believe) as a local asset on every Cloudflare node in the world.
Considering that most of a Pages site is static, those files are already candidates for caching. And that leaves the HTML portion. From what I see, Pages performs as well as “Cache Everything.” First try is a bit slow, but subsequent is a much faster TTFB for HTML.
thanks for this note. However, taking the product definition of Pages, where it states that files are copied to all Cloudflare nodes - wouldn’t caching everything achieve exactly the same thing i.e. copy files into a local node that requested it for future requests?
I’m just confused as to what benefit caching provides or why/how it should work when we know that every file is already guaranteed as present in every node, worldwide.
Sure, that data is somewhere in the Edge Network as opposed to your origin server. And when it’s needed, it’s pushed over to the corresponding data center. It’s more like Argo’s Tiered Caching.
noted - thanks. I’m just noting here for the Cloudflare Pages team. The core value prop of Cloudflare Pages is very fast static hosting. By this token, they should position it as “better than just caching” i.e. deploying to CF Pages actually copies the asset to all nodes. I’d even pay more for that guarantee, as the idea of “it’s somewhere but it might be far away” is really just like ordinary caching. The reason to actually move to Cloudflare Pages needs to be stronger for static sites, with a guarantee of global copies. This also means the first fetch from anywhere in the world is incredibly fast and local.
I’m sure you realize it’s impossible to copy all Pages content to all edge nodes. There just isn’t the capacity, nor the need (all 200+ worldwide data centers?). What it does get you is one less hop to an origin server outside Cloudflare’s network.
In that case - isn’t that the same as using “Cache Everything”?
On the point above, I don’t see the specific value prop of moving all static hosting to Cloudflare Pages, when it can stay exactly where it is right now (in a different platform) - with just “Cache Everything” rules applied to static assets.