DEV Community

Discussion on: What if I don't use GET (and DELETE)?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

From what I have found,

Also, regarding caching, what should I use for reading dynamic data? (that should not be cached, anyway)

Collapse
 
mafflerbach profile image
mafflerbach

Stil GET. Becaus it is documented in the rfc7231 to use GET for non manipulating request. The URL may is dynamic, but the response should be still the same if no other manipulating requests happen in between. And GET can also cashed on the server side or on a reverse proxy.

And in general a request body cannot cached.

Thread Thread
 
patarapolw profile image
Pacharapol Withayasakpunt

but the response should be still the same if no other manipulating requests happen in between.

How would the caching engine know?

Thread Thread
 
mafflerbach profile image
mafflerbach

Well nothing is more complicated that cach invalidation...

But in short. You have multible 'cache header' posiblities from the client side. How vanish and other reverse proxies works - no detailed knowlage. But this seems a good explanation developer.mozilla.org/en-US/docs/W...