OutputCache Bug with VaryByParam=“None” with MVC RC refresh

笑着哭i 提交于 2019-12-24 22:51:54

问题


Came across to this defect with ASP.NET RC refresh while using VaryByParam="" instead of VaryByParam="None".

Caching WORKS, but page http://www.yoursite.com and http://www.yoursite.com/home/index will be cached separately it seems.

What is the difference between VaryByParam="" and VaryByParam="None"?

edit : I mean VaryByParam="" not VaryByParam="*" cause the bug still exists with VaryByParam="*"


回答1:


VaryByParam="*" will create a new cache for every different parameter passed.
VaryByParam="None" will create one and only one cache, regardless of parameters.




回答2:


Route elements are not considered parameters for OutputCache.

What is VaryByParam in asp.net?



来源:https://stackoverflow.com/questions/606915/outputcache-bug-with-varybyparam-none-with-mvc-rc-refresh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!