如何禁用客户端和代理缓存在ASP.NET MVC? [英] How can I disable client side and proxy caching in ASP.NET MVC?
本文介绍了如何禁用客户端和代理缓存在ASP.NET MVC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是正确的(浏览器无关)的方式在ASP.NET MVC禁用页面缓存?
What is the proper (browser agnostic) way to disable page caching in ASP.NET MVC?
推荐答案
试试这个:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
public ActionResult NonCacheableData()
{
return View();
}
这篇关于如何禁用客户端和代理缓存在ASP.NET MVC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文