Saturday, August 18, 2012

time based cache expiration in asp.net

The life of cache variable is based on perticular rie period is called "Time based Expiry".This can classified in to 2 types
1.Absolute time expiry
2.Sliding time Expiry
The absolute time expiry will consider life time from  storage and the STE expiry will consider life time from last access time
Cache.Insert("variable",value,null,absolute time,sliding time)
Cache.Insert("n",100,null,DateTime.Now.Addminutes(5),Cache.Nosliding Expiration)
Cache.Insert("n",100,null,Cache.NoAbsolute Expiration,TimeSpan from minutes(5))
Post a Comment

Bel