Workers Cache(blog.cloudflare.com) |
Workers Cache(blog.cloudflare.com) |
Time to migrate rarely-updating websites that still need a CMS to Cloudflare.
> One thing to watch: when caching is enabled, requests that are normally free — static asset requests and worker-to-worker invocations through service bindings or ctx.exports — are billed at the standard request rate, because each one now consults the cache in front of your Worker.
That’s a very weird limitation from a product standpoint. You might end up spending more money by enabling caching.
I wonder if static assets and worker-to-worker invocations are really more expensive with caching enabled, or if this is just a metering problem.
I would have made this free in the interest of making billing simpler and of making the decision to enable caching more straightforward.
If you’re min-maxing costs, this encourages awkward setups where you split workers into two, one with caching enabled and one with caching disabled.
I was looking forward to the "why it took us this long" explanation but it wasn't explicitly spelled out. Any Cloudflare staff here able to expand on that?
(The article does a good job of showing how many different smart design decisions went into this, but given caching is core to what a Cloudflare does I'm still a little surprised it took 9 years to get here!)
On top of that the cache tags are a slick way to do invalidation. This looks like a great product.
- You still get billed per request, whether the request hits cache or not (but don't get billed for CPU time)
- You now get billed for static asset requests! This makes no sense to me. "One thing to watch: when caching is enabled, requests that are normally free — static asset requests and worker-to-worker invocations through service bindings or ctx.exports — are billed at the standard request rate, because each one now consults the cache in front of your Worker." Yeah that sounds like a bug that just happens to generate them more money.
- The cache key automatically has the worker deployment version, so even gradual deployments populate their own cache which is nice
- It seems like you can set a totally custom cache key? But that was previously Enterprise only, can't see if that's still the case here.
A big worry was always "why does workers sit in front of my cache? that's a waste of an invocation if i'm returning a cached result"
Thanks CF.
When Workers Cache is enabled, every cacheable request to your Worker hits Cloudflare's cache first. If there's a fresh cached response, Cloudflare returns it directly — your Worker doesn't run, and you don't pay CPU time for it. On a miss, your Worker runs, and if your response is cacheable, Cloudflare stores it for the next request. The next request from anywhere on Earth can be served straight from cache.
Incredible! This is why I shoehorn all my server side usecases on to the Workers Platform. Cloudflare, since 2020 when I first went all-in, has consistently shipped features that reduce bills significantly (except for 2023 Workers usage model changes). In one case, when they shipped free Snippets (Workers but 32kb code size & 5s CPU time) for Pro accounts ($200/yr), our bills went from £15k+ to £0.I know about the infamous "Enterprise plan" (especially, when your bandwidth is as high as ours in 100s of TBs) and know of at least one other tech shop that was required to pay for it ... but we haven't got that sales call, yet.
I am assuming it is a bunch of manual work.
it already uses Workers Cache for the route-level ISR cache
I just don’t understand why undermine your own announcements by delegating comms to the machine. It’s disrespectful to the reader.
I found it funny to just read through.
> multi-tenant-safe cache keys
> on a server-rendered app
> byte-for-byte identical (classic)
> gets a cache-speed response
> cached-file-extensions list
Honestly, this is terrible. I had to add a "use simple words only, don't hyphenate unnecessarily" warning to my Claude config. After a full day of work, having to read these Claudisms all the time make a noticeable difference on how tired you get. It gets even worse when Claude starts to make up its own vocabulary.
Also, most engineers will likely just be skimming this article before feeding it into their harness to implement the changes anyway, so it makes sense for it to be more heavy on context than it would be if meant for only humans to consume.
Responding to alleged slop with more slop doesn’t decrease the total amount of slop on the internet.
Even if you use em dashes and a few phrases that have become associated with AI writing, there’s still an unmistakeable sense of how much effort was put into the writing.
But I suppose there might be naive readers who don’t know how to spot this effort and would false positive on em dashes or supposed AI phrases.
Why are we all of a sudden pretending like pre-LLM era blogs were these pristinely well written pieces of art or even that effort and care was put into them? In most cases they were significantly less coherent and incomplete. Don’t get me started on the mess that was the communication of this particular company or one of their competitors like AWS.
The LLM explained the core concept and features very well. But it was dull and boring to me, as I already have to read this writing style at work pretty much all day every day.
Aren't you gonna let the LLM develop for you anyway? Why bother writing and reading a post at all?
> pretending like pre-LLM era blogs were these pristinely well written pieces of art
The point is the effort and care that the writer puts which differentiates it from automatically generated text. That matters because a human can sympathize and that leads to better understanding and greater connection. That's why a post is written.
> Don’t get me started on the mess that was the communication of this particular company or one of their competitors like AWS.
And we criticize those as well. Nothing's changed. Yesterday's bad content is today's slop (plus a mind boggling amount of investment, corruption and environmental side effects).