本文介绍了ASP.NET MVC - 缓存在客户端页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有code已缓存是这样的:

  [的OutputCache(持续时间=3600,位置= OutputCacheLocation.Client)

现在,我完全不知道这个输出缓存是如何工作的。正是它保持网页的副本?什么是之间的差异 OutputCacheLocation.Client OutputCacheLocation.Bro​​wser


解决方案

The location of where the cache is stored is determined by Location property of the OutputCacheAttribute. In your case you set Location=OutputCacheLocation.Client so it will keep the cache on the client browser.

OutputCacheLocation.Browser doesn't exist. It's an invalid value. The documentation of the OutputCacheLocation enumeration type contains the possible values along with a description of its usage:

这篇关于ASP.NET MVC - 缓存在客户端页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 08:53
查看更多