fastapi-cache
fastapi-cache copied to clipboard
add `no-cache` to cache exclusion
added no-cache
to cache exclusion on headers on request
@DevLucca In the case of no-cache
, after fetching the value from the origin server, wouldn't we want to refresh the cache? This would mean that future requests without the no-cache
directives would have the most up-to-date value?
@DevLucca be definition:
The
no-cache
response directive indicates that the response can be stored in caches, but the response must be validated with the origin server before each reuse, even when the cache is disconnected from the origin server.
I my opinion handling no-cache
like no-store
is wrong. In case of no-cache
I would expect to return 304 if ETag
equals if-none-match
.
Any chances to get this merged soon? I think no-cache
should be treated just as implemented. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#no-cache_2. When making a request with Cache-Control: no-cache
I would expect to bypass the cache and be returned the latest value instead.
Thanks! Please resolve conflicts
Optionally, a 304
with no content could be returned in case the latest value matches what was given as If-None-Match
. But nevertheless, the real function should be executed.
Hi guys!
I'll have a look on what was said.
Just to be sure to what @schmocker brought up, the correct implementation would be the 304
response, when If-none-match
?
If so, I'll be trying to implement it on these next days!
Thanks a lot!
Also please update the changelog, thanks!
Hi guys.
@long2ice, I've updated the changelog.md
file.
@muety, I've checked the 304
when If-None-Match
and guess that @long2ice has already implemented it.
If there is any more fixes to make, please, let me know!
Hi.
@long2ice, is there anything else to implement here?
Thanks!
Hi @long2ice!
Is there anything else left for doing?
Regards!
Thanks!