您的位置:首页 > 编程语言 > ASP

在web.config设置asp.net 页面缓存

2008-04-08 09:27 519 查看
<system.web>
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="pageCache" duration="60" varyByParam="none" enabled ="true"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>
</system.web>
上面的意思为过期时间为60秒,不根据页面参数缓存。
页面中调用此设置如下。
<%@ OutputCache CacheProfile="pageCache" %>
暂时没找到更简单的设置方法
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: