| ▲ | locknitpicker 3 days ago | ||||||||||||||||
> I'm very surprised to see all of the negativity toward Cloudflare's usability and value here. As someone who uses Cloudflare at a professional level, I don't. To me each and every single service provided by Cloudflare feels somewhere between not ready for production or lacking any semblance of a product manager. Everything feels unreliable and brittle. Even the portal. I understand they are rushing to release a bunch of offerings, but this rush does surface in their offerings. One of my pet peeves is Cloudflare's Cache API in Cloudflare Workers, and how Cloudflare's sanctioned approach to cache POST requests is to play tricks with the request, such as manipulate HTTP verb, URL, and headers, until it somehow works. It's ass-backwards. They own the caching infrastructure, they own the js runtime, they designed and are responsible for the DX, but all they choose to offer is a kludge. Also, Cloudflare Workers are somehow deemed as customizable request pipelines, but other Cloudflare products such as Cloudflare Images service can't be used with Workers as it fails to support forwarding standard request headers. I could go on and on, but ranting won't improve anything. | |||||||||||||||||
| ▲ | hyghjiyhu 3 days ago | parent | next [-] | ||||||||||||||||
Post requests aren't really meant for repeatable stuff though. Even browsers will ask for confirmation before letting you reload the result of a post request. I think you are holding it wrong. Now I get it things happen and you gotta do what you gotta do but then you aren't on the happy path anymore and you can't have the same expectations. | |||||||||||||||||
| |||||||||||||||||
| ▲ | kentonv 3 days ago | parent | prev [-] | ||||||||||||||||
The Cache API is a web-standard API. We chose to follow it in an attempt to follow standards. Unfortunately it turned out to be a poor fit. Among other things, as you note, the "cache key" is required to be HTTP-request-shaped, but must be a GET request, so to cache the result of a POST request you have to create a fake GET request that encodes the unique cache key in the URL. The keys should have just been strings computed by the app all along, but that's not what the standard says. We'll likely replace it at some point with a non-standard API that works better. People will then accuse us of trying to create lock-in. ¯\_(ツ)_/¯ | |||||||||||||||||
| |||||||||||||||||