Feature request: Add only_if_cached similiar to how it exists in requests-cache
Feature description
It would be great if we would have only_if_cached similar to how it's implemented in the requests-cache library.
See here
Use case
I don't want to make an actual request to the server if the content is already cached or even if it's not cached a 504 Not Cached response is more desirable that actually sending a request to the site.
My usecase is rate-limited APIs that have a quota which I don't want waste.
Workarounds
Not that I know of
Plan to implement
I don't have the time to look into this right now sadly.
Looking into this myself today. Seems that revalidation is already partially implemented but doesn't seem to be fully implemented.
I may have time to contribute to aiohttp client cache to add local caching. If there's a todo or something for what else needs to be done to add revalidation support I would love to work on this.
Apologies, I misread this issue. This is about getting a cached response from the cache, not about if-none-match.