Skip to content

OutputCaching extension cache stampede #493

Answered by jodydonetti
WeihanLi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @WeihanLi

seems it would not use the GetOrSet(Async) method which would avoid cache stampede

Correct, but 2 important things here:

  • to support Output Caching what is needed is to implement the IOutputCacheStore interface, and that interface only has 3 methods to implement (see here): GetAsync, SetAsync and EvictByTagAsync
  • cache stampede protection is built in the Output Cache system itself, not in the provider abstraction, so yo ustill have it (and is enabled by default, see here)

The aspnet team designed the interface that way, so there's nothing I can do to use the FusionCache version of the stampede protection.
I understand why they did that, I think the rationale was to have the…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@WeihanLi
Comment options

Answer selected by WeihanLi
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