aspnet/ResponseCaching

Expose policy provider to allow override for default response caching behaviour

JunTaoLuo opened this issue · 2 comments

Currently https://github.com/aspnet/ResponseCaching/blob/dev/src/Microsoft.AspNetCore.ResponseCaching/Internal/Interfaces/IResponseCachingPolicyProvider.cs is not exposed publicly. This type will need some work but exposing it will allow user overrides for checks on what is deemed cacheable, when response caching should apply, and expiry checks for cache entries.

Being able to manipulate the cache entries would be great.

We have some data which doesn't change very often but which is accessed very frequently, however; when the data changes we would like to clear the cache immediately. Currently we're in-memory caching inside our business logic but it would be so much cleaner and simpler if we could somehow just clear the response cache for a given endpoint.

This issue was moved to dotnet/aspnetcore#2612