【问题标题】:Invalidate the whole output cache in asp .net MVC 2使asp .net MVC 2中的整个输出缓存无效
【发布时间】:2011-01-24 13:32:00
【问题描述】:

如何使 asp .net mvc 2 中的整个输出缓存无效?

【问题讨论】:

    标签: asp.net-mvc-2 caching outputcache invalidation


    【解决方案1】:

    AFAIK 这是不可能的。您只能通过使用 [OutputCache] 属性装饰可能已缓存的特定操作来使它们无效。

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

    【讨论】:

      【解决方案2】:

      虽然我不知道是否有办法在代码中做到这一点,但仍然回收工作进程可能会使服务器缓存失效。

      如果这是真的,那么您甚至可以在代码中通过代码来执行回收。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-01-28
        • 2018-11-09
        • 1970-01-01
        • 2011-04-19
        • 2014-08-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多