时间:2021-07-01 10:21:17 帮助过:12人阅读
<system.web>
<outputCacheSetting>
<outputCacheProfiles>
<add name="cacheTest" duration="50"/>
<outputCacheProfiles>
</outputCahceSetting>
</system.web>
在页面中声明
<%@ OutputCache CacheProfile="cacheTest" VaryByParam="none"%>
VaryByControl:通过控件来改变缓存
<%@OutputCache Duration="60" VaryByParam="none" VaryByControl="Button1"%>