Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

64% Positive

Analyzed from 1420 words in the discussion.

Trending Topics

#cache#don#writing#workers#cloudflare#worker#llm#why#read#request

Discussion (59 Comments)Read Original on HackerNews

simonwabout 1 hour ago
> This is the caching API we've always wanted Workers to have. Here's why it took us this long

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!)

tshaddox41 minutes ago
The article was very clearly written or heavily edited by AI, which I suspect explains some of the peculiarities in structure and wording.
vlucasabout 1 hour ago
Huge props to just sticking with the HTTP spec on this one with `Cache-Control` headers with `stale-while-revalidate` support. It's amazing how many other providers mess that up.

On top of that the cache tags are a slick way to do invalidation. This looks like a great product.

dbbk11 minutes ago
I was a bit confused what this adds other than just standard CDN-Cache-Control page caching that we do now. Some quirks I've found;

- 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.

mchavabout 1 hour ago
Great feature. Although I’m starting to get annoyed by obvious signs of LLM writing like no X, no Y etc.
xpctabout 1 hour ago
People that don't like writing now get to write by offloading it to an LLM, and this is the result. I miss the world where articles were mostly written by people who had the interest and patience to do it.
383toast27 minutes ago
At least for me I don't really read these posts/docs, I just give the link to claude and it'll implement it regardless of wording
pythonaut_1620 minutes ago
Is this a bot or LLM reply? Because you've given this exact comment word for word at least twice in this thread...
dangoodmanUTabout 1 hour ago
finally, this was needed.

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"

jasoncartwrightabout 1 hour ago
The previous Worker in-front of the cache never made sense to my old school proxy in-front of the appserver mindset. Already using this to speed up a tool. Nice work.
dbbk7 minutes ago
Cloudflare Snippets were actually better if you wanted to run logic before the cache (they are entirely free)
lekeviciusabout 1 hour ago
Amazing, exactly what Workers lacked, I was quite annoyed that a worker would spin up when 99% of my requests then return a cache. Waste of 3ms, times millions.
TimCTRL18 minutes ago
i just love the sweet $0 invoice at the end of each month for all these services.

Thanks CF.

NSUserDefaultsabout 1 hour ago
Reinventing the web, one service at a time. Is it really that hard to build things like this on a per-case base, small scale, all on a bare bones VPS? Do we need a global gateway to help us not screw up the basics? Service looks nice but makes me sad somehow.
thinkafterbefabout 2 hours ago
Finally proper stale-while-revalidate support!
dbbk6 minutes ago
That landed a few months ago
htshabout 1 hour ago
curious, how does one configure something like this for AWS Lambda? Appreciate it.

I am assuming it is a bunch of manual work.

bauericabout 1 hour ago
Equivalent is probably putting AWS CloudFront in front of your lambda. Has edge caching with customizable config.
afavourabout 1 hour ago
You use Cloudfront. Which you’re already doing anyway but yes, you do need to configure it.
coredog64about 1 hour ago
Technically, probably CloudFront.
Advertisement
davidmurdochabout 2 hours ago
The feature is great. The post itself is a slop grenade.
napsterbrabout 2 hours ago
One of the recent AI tells other than em dash is the excessive usage of hyphenated words:

> 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.

topgrain2about 1 hour ago
Fuck, I spent all these years developing a thoughtful writing style that leaned toward clarity for the reader, even if it meant extra work to achieve precision, or adding affordances like “excessive” hyphenation, and now I guess have to learn to write worse.
tshaddox36 minutes ago
I think it’s exceedingly unlikely for a good-faith reader to mistake good-faith human writing for AI writing.

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.

ambicapter10 minutes ago
Oh no, how will you write clearly without hyphens?
napsterbrabout 1 hour ago
There is a world of difference between well-written human text and sloppy walls of AI-generated text. There's nothing wrong in using hyphenations or emdashes -- I use them myself! That's not the point of my comment.
davidmurdoch42 minutes ago
Don't change. The homogenous way LLMs write is just tiresome and boring, like if every movie stared Ryan Reynolds - an actor famous for having no range. Ryan Reynolds is enjoyable to watch on occasion, but I don't want everything I watch to be Ryan Reynolds.
swiftcoderabout 1 hour ago
It does feel a bit like the LLMs have commoditised correct writing form, and all the plebs are all up in arms about it...
CodesInChaosabout 1 hour ago
I have an over-hyphenated writing-style as well. Probably my Germanness.
ambicapter9 minutes ago
There is not reason whatsoever to hyphenate "writing style".
nwatsonabout 1 hour ago
I opine that over-hyphenation adds clarity.
arikrahmanabout 2 hours ago
One of the earliest tells was the use of emdashes.
dan_sblabout 2 hours ago
Billion dollar company can't afford one human copywriter. The future is great! (edit: copyrighter -> copywriter)
davidmurdochabout 2 hours ago
They could just feed an llm a small corpus of past human authored posts from their site, and have the LLM rewrite it in a style matching style, and it would likely turn out pretty great.
jgrahamcabout 1 hour ago
I've tried this with my own blog posts from blog.jgc.org and the result was... not good. It basically wrote something that read like a parody.
ButlerianJihadabout 1 hour ago
Neither can you afford a copywriter, evidently?
CodesInChaosabout 2 hours ago
Modern cloudflare in a nutshell.
lijokabout 2 hours ago
Can you elaborate? I read it, found the concepts well explained, walked away better informed.

Responding to alleged slop with more slop doesn’t decrease the total amount of slop on the internet.

davidmurdochabout 2 hours ago
You think I'm using AI to leave comments like this on HN?
skrebbelabout 2 hours ago
"slop" doesn't mean "AI generated content", it means bad content, a waste of the reader's time. Grantparent's implication is that your comment was bad content, not that it was AI generated bad content.
geraneumabout 1 hour ago
Not the original commenter; but, at least for me, the idea is that when it’s written by humans we know that effort and care were put into communicating the news. Otherwise they could post a link to the docs and we could ask my flavor of LLM to summerize. No need for extra filler content. That why it’s slop and it’s different.
lijokabout 1 hour ago
I don’t have access to my flavor of LLM on the train nor the time or budget to have it do the research and summary for me

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.

ignoramousabout 1 hour ago

  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.

PUSH_AXabout 1 hour ago
Our bandwidth is very high, we constantly get invited onto the call with their team, but after talking with them a few times it makes absolutely zero sense for us to have a committed spend, all the stuff I needed an account manager for in GCP/AWS just doesn't exist in CF. Support wise I imagine if it's broken for us it's also broken for 2 million other people so... yeah... Thanks CF!
hdzabout 1 hour ago
Does anything beat a free static site hosted with Cloudflare workers at this point, performance wise?
nicceabout 1 hour ago
Very difficult to beat if you don't process or store private information that should not be given to the US company.
adasqabout 2 hours ago
now, waiting for opennext adapter maintainers to catchup with it
brendanibabout 1 hour ago
use vinext! (now 1.0 beta) https://vinext.dev/ https://x.com/James_Elicx/status/2073457440461303836

it already uses Workers Cache for the route-level ISR cache

danabramov33 minutes ago
Please please please write your own blogposts. I already read “but here’s the biggest unlock, and it’s the part that’s hardest to see” all day.

I just don’t understand why undermine your own announcements by delegating comms to the machine. It’s disrespectful to the reader.

rob27 minutes ago
There has to be some sort of "/humanize-text" skill they can pass the output to before publishing.
danabramov12 minutes ago
There is this one! Though I have not tested it. https://github.com/stephenturner/skill-deslop

I found it funny to just read through.

383toast27 minutes ago
At least for me I don't really read these posts/docs, I just give the link to claude and it'll implement it regardless of wording
jesse_dot_id18 minutes ago
This is also 100% what I just did. In fact, I think companies should be releasing a human readable format as well as a machine readable format.