ASP.NET中如何对页面输出缓存
使用很简单<%@ OutPutCache Duration="60" VaryByParam="none"%>
Duration:缓存时间
VaryByParam:通过参数来更新缓存的内容
还有其他的一些属性
CacheProfile:调用WebConfig中的缓存时间
例如:WebCofig中
<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"%>
您可能感兴趣的文章:
ASP.NET中如何对页面输出缓存
php Smarty的缓存操作
ASP.NET缓存的方法分析
php输出缓存ob系列函数用法
CodeIgniter框架中启用和清除缓存的教程
.net缓存应用与分析
asp.net性能优化方法-缓存数据和页输出
asp.net 提高网站速度及缓存
PHP如何执行耗时脚本实时输出内容
利用ASP.NET的三种缓存提高站点性能