Invalidate the whole output cache in asp .net MVC

2019-06-03 05:06发布

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

2条回答
霸刀☆藐视天下
2楼-- · 2019-06-03 05:19

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.

查看更多
闹够了就滚
3楼-- · 2019-06-03 05:43

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"));
查看更多
登录 后发表回答