Cache-Control Header vs client side caching for turbo

Hello wonderful community!

I have to put the disclaimer that I’m using htmx, but my question also translates to turbo. As far as I’ve read in both htmx and turbo some caching mechanism is implemented.

My question is, if all browsers implement the Cache-Control header and it is heavily battle tested, why not use it as the main cache mechanism? What are the advantages and disadvantages to implement caching clientside using Cache-Control vs turbo caching mechanism?

You could also redirect the question to Cache-Control vs react-query caching mechanism, so to speak.

In my innocent view, the header way is far simpler, requires one line of code (at least in golang, my server language of choice), is framework agnostic, far more battletested than any other js solution (cache invalidation is a hard problem meme), but I might be misunderstanding something, or missing some hidden complexity. So, please, enlighten me :slight_smile: