ASP.NET FAQS | |
Sliding Expiration: With sliding expiration, ASP.NET waits for a set period of inactivity to dispose of a neglected cache item. Ex: Cache.Insert("MyItem",obj,null,DateTime.MaxValue, TimeSpan.FromMinutes(10)) --> The cached data will be removed only if it is not used within a ten-minute period. Absolute Expiration: With absolute expiration, we set a specific date and time when the cached item will be removed. Here’s an example that stores an item for exactly 60 minutes: Cache.Insert("MyItem",obj,null,DateTime.Now.AddMinutes(60), TimeSpan.Zero) | |
Two types of cache dependency available in .Net 1.File and Cache Item Dependency :- Cache item can be dependent on a particular file. On modification of this file, cache will be invalidated. 2.Dependencies on a database query :- cache items can be depenedent on sql queries as well, any changes to sql data, cache will be invalidated. | |
The OutputCacheModule Caching in Asp.Net is implemented as an HttpModule that listens to all HttpRequests that come through the ASP.NET worker process. | |
| |
| |
ASP.NET FAQS |
ASP.NET Caching FAQS
ASP.NET Caching FAQS Page 2
Posted by
Ramu