Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Issue: OutputCache CacheProfile varyByParam does not work [425]

$
0
0
I've faced a problem when varyByParam set in web.config was not respected.

<add name="MyName" duration="5" varyByParam="none" />

//this works
[OutputCache(CacheProfile = "MyName", VaryByParam = "None")]

//this doesn't
[OutputCache(CacheProfile = "MyName")]

I've looked into source code, and I've found
private OutputCacheParameters _cacheSettings = new OutputCacheParameters { VaryByParam = "*" };
in OutputCacheAttribute. If I understand it right, it means that varyByParam from CacheProfile will be overridden with "*".
// Pick up the settings from the configuration settings profile first
...
// Start overriding options from the directive
if (cacheSettings.IsParameterSet(OutputCacheParameter.VaryByParam)) {
varyByParam = cacheSettings.VaryByParam;
}

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>