晨鸟科技
标题:
System.Web.Caching
[打印本页]
作者:
Star
时间:
2010-12-29 16:41
标题:
System.Web.Caching
public void AddItemToCache(Object sender, EventArgs e) {
) ^4 j4 i" _2 y( m. I
itemRemoved = false;
$ t& |8 w3 F1 }. Z! o" V3 r
* a' S" o6 x: C, L
onRemove = new CacheItemRemovedCallback(this.RemovedCallback);
6 }2 S- L# S2 l! ^' X
) l6 a) B: z4 E; ]5 E; `$ Q/ V/ n
if (Cache["Key1"] == null)
- @# s' @% K8 I! v4 r
Cache.Add("Key1", "Value 1", null, DateTime.Now.AddSeconds(60), TimeSpan.Zero, CacheItemPriority.High, onRemove);
, L; @$ ^3 }' ^0 g
}
复制代码
详见:
http://msdn.microsoft.com/zh-cn/ ... b.caching.cache.add
(VS.80).aspx
欢迎光临 晨鸟科技 (http://www.chenniao.com/cprofessor/)
Powered by Discuz! X3.2