Open ronniebarker opened 2 years ago
Same response as here but the key provider is also not public. There is a CacheKey
property on the OutputCacheContext
, but I will need to check if it can be set by custom policies still.
I checked and the CacheKey
is also internal. We'll use this feedback to discuss if the interface should be public.
Triage: we'll consider making this public in 8 based on demand.
7.0 RC2 Output Caching will have SetVaryByHost(bool)
That's great!
On Tue, Sep 13, 2022 at 19:24:24, Sébastien Ros @.***> wrote:
7.0 RC2 Output Caching will have SetVaryByHost(bool)
— Reply to this email directly, view it on GitHub https://github.com/dotnet/aspnetcore/issues/43271#issuecomment-1245795998, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA7RBJRDVIG7TLTTQW7JXDV6DBFRANCNFSM56O6MYZQ . You are receiving this because you authored the thread.Message ID: @.***>
Ideally, response caching should really only take notice from the path onwards (with all the great options for query parameters and headers of course) sine
http://mydomain.com/images/logo.png
andhttps://mydomain.com/images/logo.png
andhttp://192.168.1.1/images/logo.png
andhttps://www.mydomain.com/images/logo.png
should be the same resource (since they are actually the same file) and only cache once (and when one is replaced, so should all the others).So I thought maybe I could just register a new
IResponseCachingKeyProvider
that provided a different implementation of the key, but all the interfaces areinternal
- so much of open for extensibility :-(