源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

asp.net 页面输出缓存

  • 时间:2020-03-13 15:16 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:asp.net 页面输出缓存
主要用于不经常更新和修改,而在第一次编译是时要经过大量处理的数据。页面输出缓存是缓存的整个页面 使用很简单<%@ OutPutCache Duration="60" VaryByParam="none"%> Duration:缓存时间 VaryByParam:通过参数来更新缓存的内容 还有其他的一些属性 CacheProfile:调用WebConfig中的缓存时间 例如:WebCofig中
[u]复制代码[/u] 代码如下:
<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"%>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部