Invalidate the whole output cache in asp .net MVC 2

試著忘記壹切 提交于 2020-01-23 17:39:28

问题


How is it possible to invalidate the whole output cache in asp .net mvc 2?


回答1:


AFAIK this is not possible. You can only invalidate specific actions that might have been cached by decorating them with the [OutputCache] attribute.

HttpResponse.RemoveOutputCacheItem(Url.Action("Index", "Products"));



回答2:


While I don't know if there is a way to do it in code, still recycling the worker process might invalidate the server cache.

If this is true then you might even do it in code by having code to do the recycling.



来源:https://stackoverflow.com/questions/4782569/invalidate-the-whole-output-cache-in-asp-net-mvc-2

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