OutputCache is sending wrong Vary header when the call hits the cache

前端 未结 3 2183
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-20 06:59

I have an action method that I want to cache:

[OutputCache(Duration=60*5, Location=OutputCacheLocation.Any, VaryByCustom=\"index\")]
public ActionResult Index()
         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-20 07:41

    Sort of wrestling with something similar myself. Have you tried in the web.config to the setting omitVaryStar=true

    https://msdn.microsoft.com/en-us/library/ms228124(v=vs.100).aspx

提交回复
热议问题