fastapi-redis-cache icon indicating copy to clipboard operation
fastapi-redis-cache copied to clipboard

cache-control: no-cache behavior is wrong

Open a-luna opened this issue 4 years ago • 1 comments

per MDN, the HTTP 1.1 spec, and every other authoritative resource on this subject, the cache-control no-cache directive is NOT used to indicate that a response should not be cached.

This is rather unintuitive, but I probably should have known this before I went and built a caching plugin for FastAPI. I need to figure out exactly how to fix this, which will probably reveal even more places where I have violated the most basic of caching rules.

a-luna avatar Jul 07 '21 07:07 a-luna

Hello! Any progress on this issue? In my case it seems that the cache-control: no-cache|no-store header is simply ignored by fastapi-redis-cache, resulting in caching with an expiry period of 60 seconds.

My opinion that the cache-control: no-cache situation should be left for implementation for the users of the library.

ionutbaltariu avatar Jul 01 '22 17:07 ionutbaltariu