I would suggest that UBI in fact already exists, just in a subset of tech jobs where you have to engage in a certain kind of theater to get it. It's only by construction though that losing these jobs would be a problem. We have pointless busywork (and a ton of other problems) because housing is a failed market, essentially.
Automatic version detection, revalidation, prewarming... caching seems so complicated these days. Forgive me for starting a sentence with "why don't we just"... but why don't we just use the hash of the object as the cache key and be done with it? You get integrity validation as a bonus to boot.
A lot of people are criticizing this for unnecessary complexity, but it's a little more complicated than that. I actually think it makes sense given where they are at right now. The complexity stems from Vercel and Next.js - had they used a different tech, say Cloudflare directly and architected their own systems designed to handle rapidly changing static content none of this would have been necessary. So I guess it depends on your definition of unnecessary complexity. It's definitely unnecessary for the problem space, but probably necessary for their existing stack.
I just don’t get it. Their last paragraph describes how they changed their dynamic site to be static. So then why do you need workers at all? Just deploy to a CDN.
How do you do version updates? Add content hash to all files except for root index.html.
Cache everything forever, except for index.html
To deploy new version upload all files, making sure index.html is last.
Since all files are unique, old version continues to be served.
No cache invalidating required since all files have unique paths, expect index.html which was never cached.
You have to ensure you absolutely have properly content hashes for everything. Images, css, js. Everything
10 comments
[ 3.0 ms ] story [ 56.0 ms ] thread“Incremental Static Regeneration” is also one of the funniest things to come out of this tech cycle.
How do you do version updates? Add content hash to all files except for root index.html.
Cache everything forever, except for index.html
To deploy new version upload all files, making sure index.html is last.
Since all files are unique, old version continues to be served.
No cache invalidating required since all files have unique paths, expect index.html which was never cached.
You have to ensure you absolutely have properly content hashes for everything. Images, css, js. Everything