Sponsored White Papers, Webcasts, and Downloads
TechRepublic Resources
- Caching
- How to remove a cache variable on application close in asp.netExplicit removal on an object from cache example below:public void Application_OnStart{System.IO.StreamReader sr =new System.IO.StreamReader("pi.txt");string pi = sr.ReadToEnd;Context.Cache.Add("pi", pi, null,Cache.NoAbsoluteExpiration,new TimeSpan(0, 5, 0),CacheItemPriorityDecay.Never,new CacheItemReomovedCallback(this.OnRemove));}public void OnRemove(string key, object val, CacheItemRemovedReason r){// respond to cache removal here}Setting an absolute expiration for a...
- Tags: coolmanohar@...
- Q&A 2004-12-21
- << Previous
- page 1 of 1
- Next >>