OutputCache 不适用于 location="Client"

问题描述

好的,所以我在 web.config 中有这个:

<caching>
  <outputCacheSettings>
    <outputCacheProfiles>
      <add name="Client" duration="3600" varyByParam="*" location="Client"/>
    </outputCacheProfiles>
  </outputCacheSettings>

为了测试它,我创建了一个简单的 ActionResult,它返回一个带有当前时间的视图并用以下内容对其进行修饰:

[OutputCache(CacheProfile = "Client")]

我知道,如果您按 F5,您就是在从服务器重新请求页面,即使它已被缓存,因此,我在菜单中放置了一个链接,我正在使用它一个来测试。

缓存不起作用:( 但如果我放置 location="Server",它会很好用。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...