Users are able to make site throw an exception when using ResponseCaching middleware.
Bartmax opened this issue · 5 comments
Bartmax commented
using the ResponseCachingMiddleware
with VaryByQueryKeys
[ResponseCache(CacheProfileName = "DefaultCache", VaryByQueryKeys = new string[] { "id" })]
open chrome inspector
tick disable cache
go to page that uses a ResponseCache
with VaryByQueryKeys
it throws:
InvalidOperationException: 'VaryByQueryKeys' requires the response cache middleware.
closing the inspector or untick disable cache work fine.
Using fiddler, adding Pragma: no-cache
header is enough to make the site throw an exception.
guardrex commented
ctolkien commented
Bartmax commented
Looks like incognito mode on safari render the actions with VaryByQueryKeys
useless too.