我可以强制MVC得到一个新的页面? [英] Can I force MVC to get a new page?

查看:99
本文介绍了我可以强制MVC得到一个新的页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用code是这样的:

I am using code like this:

[OutputCache(Duration = 86400, VaryByParam = "none")] 
public ActionResult Index() {
}

一切都运行良好,但有些时候,我想迫使MVC得到一个新的页面,当我使用做一个重定向到索引页面

Everything works well BUT there are times when I would like to force MVC to get a new page when I do a redirect to the index page using:

RedirectToAction("index", "home");

这可能吗?是否有某种方式,我可以缓存失效?

Is this possible? Is there some way that I can invalidate the cache?

推荐答案

您可以尝试是这样的:

HttpResponse.RemoveOutputCacheItem("/Home");

这篇关于我可以强制MVC得到一个新的页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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