What is Absolute and Sliding expiration in .NET? - ASP.NET

What is Absolute and Sliding expiration in .NET?

Absolute and sliding expiration are two Time based expiration strategies.

Absolute Expiration: Cache in this case expires at a fixed specified date or time.

Example:
Cache. Insert("ABC", ds, null, DateTime.Now.AddMinutes(1), Cache.NoSlidingExpiration);

The cache is set to expire exactly two minutes after the user has retrieved the data.

Sliding Expiration: the cache duration increases in this case by the specified sliding expiration value every time the page is requested. More a page is requested it will remain in cache, whereas a less requested page will not remain in cache.

Example:
Cache.Insert("ABC", ds, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(1));
Concepts and capabilities of cross page posting - ASP.NET
concepts of cross page posting - Cross Page Posting: It refers to the scenario where on event of some controls posts...
How to access ViewState value of this page in the next page - ASP.NET
How to access ViewState value of this page in the next page - PreviousPage property is set to the page property of the nest page to access..
What is SQL Cache Dependency in ASP.NET?
SQL Cache Dependency in ASP.NET - It is the mechanism where the cache object gets invalidated when the related data or the related resource is modified....
Post your comment