Skip to content

Invalidate agressive cache #18480

Answered by ayende
SbiCA asked this question in Q&A
May 7, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

It would be cheaper to do:

Interlocked.Increment(ref store.GetRequestExecutor().Cache.Generation);

This will not clear the cache, but force a refresh from the server for all cached requests.
That way, if the data didn't change, you'll still get 304 reply

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ayende
Comment options

Answer selected by ayende
@SbiCA
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants