-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
varyByParam="None" not work #55
Comments
I suspect this behavior is controlled outside of the output cache provider (e.g. by ASP.NET)- from what I remember, the interface it implements is pretty simple and the decision of what to cache and what not to cache is not made by this provider. I suggest you try this out with some other output cache providers and compare the behavior. |
I am having the same issue - the varyByParam is not respected in asp.net mvc outputCacheProfiles from web.config. It always varies by param causing many copies to be put in cache. |
@SiddharthChatrolaMs - can you please check with the ASP.NET team on this issue. As I mentioned above, I suspect this is not specific to this cache provider implementation, but we should confirm and have recommendations from the experts. |
I just found that if you set the parameter on the [OutputCache] Attribute in the controller method then it works as expected. example you would write [OutputCache(VaryByParam ="none")] in the controller. What does not work is if you try and just set this in the config file where you have a named output cache profile [OutputCache(CacheProfile = "MyCustomCacheProfile")] I verified this works as expected if you set it in the code - only one cache item created in Redis |
@murilobom, @Firegarden, is this still something you would like to see looked into? Apologies for the late response, the team has been quite busy. |
When I add varyByParam = "None" in outputCacheProfiles the outputcache does not ignore the parameters that are added in the url, the redis cache stores another record.
The text was updated successfully, but these errors were encountered: