页面缓存 OutputCache
<%@ OutputCache Duration="15" VaryByParam="none" %> 使用页面输出缓存
<%@ OutputCache Duration="3600" VaryByParam="id" %> 使用参数变化输出缓存
<%@ OutputCache Duration="3600" VaryByControl="DropDownList1" %> 基于控件变化的输出缓存
<%@ OutputCache Duration="3600" VaryByHeader="User-Agent" %>基于头变化的输出缓存
<%@ OutputCache Duration="3600" VaryByParam="none" VaryByCustom="browser" %>基于浏览器变化的输出缓存
<%@ OutputCache Duration="3600" VaryByParam="none" Location="Any"%>设置缓存的位置
<%@ OutputCache Duration="3600" VaryByParam="none" %> 创建页面输出缓存的文件依赖 当文件修改时 缓存页面自动失效 并重新在下次页面请求是生成
Response.AddFileDependency(MapPath("Movies.xml"));
<%@ OutputCache Duration="3600" VaryByParam="none" %>使用编程的方式设置页面输出缓存过期
HttpResponse.RemoveOutputCacheItem(Page.ResolveUrl("~/xxxx.aspx"));
Response.Redirect("~/xxxx.aspx");
<%@ OutputCache Duration="3600" CacheProfile="CachelHours" %>创建页面输出缓存配置
<system.web>
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="CacheHour" duration="3600" varyByParam="none"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>
</system.web>
转载于:https://www.cnblogs.com/Yellowshorts/archive/2013/02/18/2915893.html
页面缓存 OutputCache相关推荐
- ASP.NET 页面缓存 @ OutputCache
<%@ OutputCache Duration="900" VaryByParam="None" %> ASP.NET页面缓存900秒 转载于:h ...
- .Net页面缓存OutPutCache详解
一 它在Web.Config中的位置<system.web><!--页面缓存--><caching><outputCacheSettings><o ...
- 页面缓存OutputCache
缓存:把数据放到内存里面,下次请求的时候,直接从内存读取数据返回给客户端就可以了,不用再去访问数据库或者磁盘,用内存空间换磁盘读的时间. 页面缓存 使用@OutputCatch指令能够声明页面输出缓存 ...
- Mvc 页面缓存 OutputCache VaryByCustom
优化网站,dotNet MVC 可以通过(OutputCache)特性在某些Action上使用缓存,如果我们想要自定义缓存依据可以通过如下方式进行: 第一步, 在 global.asax.cs 文件中 ...
- [转]Asp.net mvc 网站之速度优化 -- 页面缓存
网站速度优化的一般方法 由于网站最重要的用户体验就是速度,特别是对于电子商务网站而言. 一般网站速度优化会涉及到几个方面: 1. 数据库优化 - 查询字段简历索引,使用数据库连接池和持久化,现在还有种 ...
- MVC缓存OutPutCache学习笔记 (一) 参数配置
OutPutCache 参数详解 Duration : 缓存时间,以秒为单位,这个除非你的Location=None,可以不添加此属性,其余时候都是必须的. Location : 缓存放置的位置; 该 ...
- 转(ASP.NET页面缓存)
本文转至 http://www.cnblogs.com/fishtreeyu/archive/2011/03/01/1968004.html ( ⊙ o ⊙ )!呀... 没有找到名字.. ...
- 页面缓存 ,数据源缓存,自定义缓存
<%@ OutputCache Duration="20" VaryByParam="none" %> //缓存整个页面,时间为20秒, < ...
- 性能优化之页面缓存(以Javascript方式缓存页面部件)
本篇文章为大家讲解一个关于客户端缓存页面的技巧--以Javascript的方式来缓存页面的静态"部件". 如果整个页面能够被缓存到浏览器上,一个满载HTML的巨大页面也能运行地很棒 ...
最新文章
- OOJ-面向对象的JAVASCRIPT(二)
- 1.2 离散时间信号-采样
- NHibernate之旅(14):探索NHibernate中使用视图
- boost::function2用法的测试程序
- HTTPS 路径配置
- 前端学习(1688):前端系列javascript之几个面试题
- 计算机电力英语翻译,电力专业英语阅读与翻译..doc
- “我,程序员,33岁,距离退休,只剩2年了!”
- ros的package.xml从format1到format2的修改方法
- php tp3.2 脚本大量数据操作思路
- html实现登录界面
- 小小知识点(十九)护眼色豆沙绿的设置
- SSID、BSSID、ESSID的区别
- 3无重复字符的最长子串longest-substring-without-repeating-characters
- 咸鱼Micropython— 标准库
- 基于CentOS7.2的服务器搭建教程《一》
- html5页面打不开原因,有网但是网页打不开是什么原因(原因及2种解决方法)
- 科学可视化与信息可视化
- 微信开发 新浪SAE开发平台 验证Token 一直失败
- 美团图神经网络训练框架的实践和探索