摘要: 1、将值直接写入CacheHttpContext.Current.Cache["One"] = "1";使用'绝对过期'方式处理缓存,过期时间为:9999年12月31日 (不推荐使用该方法处理缓存,并且应在适当的时候清空缓存Key)2、使用Insert(String, Object)插入Cache 1 string cacheKey = "Two"; 2 object cacheValue = HttpContext.Current.Cache.Get(cacheKey); 3 4 if(cacheValue == n 阅读全文
posted @ 2012-01-29 13:00 遗失的浮云 阅读(439) 评论(0) 推荐(0)
摘要: Absolute[D.J.:'æbsəlju:t]绝对的,完全的Sliding[D.J.:'slaidiŋ]滑动的,可变化的Expiration[D.J.:,ekspɪ'reɪʃɵn]截止,过期,满期Dependency[di'pendənsi]依赖项Reason[D.J.:'ri:zən]原因,理由Priority[D.J.:prai'ɔriti]优先级,优先权 阅读全文
posted @ 2012-01-29 12:14 遗失的浮云 阅读(121) 评论(0) 推荐(0)
摘要: Duration 过期时间(单位为'秒');Location 用于控制缓存输出的位置 (Any|Client|Downstream|Server|None|ServerAndClient);Shared 页面(Page)包含用户控件(UserControl)时,如果用户控件(UserControl)启用缓存,用户控件是否共享缓存给调用该用户控件(UserControl)的包含页(Page);VaryByParam GET或POST传递的参数名称,该名称用于立即更改(参数值不一样时,例如:VaryByParam 值为 "Kind" 第一次Kind=1,第二次K 阅读全文
posted @ 2012-01-29 11:48 遗失的浮云 阅读(149) 评论(0) 推荐(0)