编程中止的OutputCache时间在asp.net mvc的 [英] Abort OutputCache duration programatically in asp.net mvc

查看:166
本文介绍了编程中止的OutputCache时间在asp.net mvc的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的OutputCache属性缓存在服务器端的我的行动的HTML输出。

I'm using the OutputCache attribute to cache my action's html output at the server-side.

精细,它的工作原理,但现在我有一种情况,内容的变化也很少,但是当它,它的关键用户看到新的数据在下次请求。

Fine, it works, but now I have a situation where the content changes rarely, but when it does, it's critical for the user to see the new data the very next request.

那么,有没有一种方法以编程方式中止页面缓存时间?

So, is there a way to abort the page cache duration programatically?

由于提前,

安德烈·卡卢奇

推荐答案

是的,这是可以使用的Htt presponse.RemoveOutputCacheItem方法。检查这个问题:

Yes, it is possible using HttpResponse.RemoveOutputCacheItem Method. Check this question:

  • SO - How to programmatically clear outputcache for controller action method

这篇关于编程中止的OutputCache时间在asp.net mvc的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆