Output-caching should support custom cache invalidation through IOutputCachePolicy #59127
Open
1 task done
Labels
area-middleware
Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware
feature-output-caching
Needs: Attention 👋
This issue needs the attention of a contributor, typically because the OP has provided an update.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I was working to migrate from my old caching mechanism to Output Cache, but I was struggled on an issue. I was trying to revalidate the cache in IOutputCachePolicy.ServeFromCacheAsync because the document said that at that point the freshness of the cached response can be updated. What I found out is.
Describe the solution you'd like
I would like to suggest the following solution.
MarkCacheInvalid()
.Additional context
Now it is possible by hacking through internal members by reflection, but I believe it should be implemented because right now there is not much we can do related to the cache in IOutputCachePolicy.ServeFromCacheAsync.
The text was updated successfully, but these errors were encountered: