在web.config设置asp.net 页面缓存
2012-11-30 20:06
453 查看
<system.web>
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="pageCache" duration="60" varyByParam="none" enabled ="true"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>
</system.web>
上面的意思为过期时间为60秒,不根据页面参数缓存。
页面中调用此设置如下。
<%@ OutputCache CacheProfile="pageCache" %>
暂时没找到更简单的设置方法
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="pageCache" duration="60" varyByParam="none" enabled ="true"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>
</system.web>
上面的意思为过期时间为60秒,不根据页面参数缓存。
页面中调用此设置如下。
<%@ OutputCache CacheProfile="pageCache" %>
暂时没找到更简单的设置方法
相关文章推荐
- 在web.config设置asp.net 页面缓存
- asp.net设置默认打开页面,Web.config,defaultDocument
- asp.net设置默认打开页面 Web.config defaultDocument
- ASP.NET程序中动态修改web.config中的设置项目(前台页面代码)
- asp.net设置默认打开页面 Web.config defaultDocument
- asp.net 2.0小tips:在web.config里设置用户定义控件
- asp.net mvc 3 配置全局异常处理 Web.config中设置CustomError
- 项目--Asp.net全局变量的设置和读(web.config 和 Gloab)
- 读书札记:Webconfig元素配置详解(ASP.NET 设置架构)
- ASP.NET中动态修改web.config中的设置项目(CS页代码)
- ASP.NET读取设置Web.config文件--数据库
- ASP.Net在web.config中设置上传文件的大小方法
- ASP.Net在web.config中设置上传文件的大小方法
- ASP.NET web.config 设置
- 通过编程为ASP.NET页面设置缓存
- 设置asp.net程序在web.config被修改后是否重启
- ASP.NET配置设置-关于web.config各节点的讲解
- 设置asp.net程序在web.config被修改后是否重启
- asp.net通过web.config设置网站默认页
- Asp.Net中的获取Web.config中设置的参数!(前后台的代码示例)