Absolute and sliding expiration, DOT NET Programming

What is Absolute and Sliding expiration?

The Absolute Expiration allows you to specify the duration of the cache, beginning from the time the cache is activated. The given example shows that the cache has a cache dependency specified, as well as an expiration time of 1 minute.

Cache.Insert("announcement", announcement, depends, _ DateTime.Now.AddMinutes(1), Nothing)

The Sliding Expiration specifies that the cache will expire if a request is not made within a specified time interval. Sliding expiration policy is beneficial whenever you have a large number of items that require to be cached, as this policy enables you to keep only the most frequently accessed items in the memory. For e.g. , the following code specifies that the Cache will have a sliding duration of 1  minute. If a request is made 59 seconds after the cache is accessed, the validity of the cache would be reset to other minute.

Cache.Insert("announcement", announcement, depends, _ DateTime.MaxValue, _ TimeSpan.FromMinutes(1))

Posted Date: 9/22/2012 1:13:44 AM | Location : United States







Related Discussions:- Absolute and sliding expiration, Assignment Help, Ask Question on Absolute and sliding expiration, Get Answer, Expert's Help, Absolute and sliding expiration Discussions

Write discussion on Absolute and sliding expiration
Your posts are moderated
Related Questions
Explain the limitations of AJAX. The following are the limitations of AJAX: It is complex to bookmark a particular state of the application. Function given in the code-be

Modification in .net website I need some modification in asp.net website. It's an e-commerce site. Skills required: .NET, HTML, eCommerce, Shopping Carts, Website Design

Develop .Net project Project Description: We want to make .net you have to be good knowledge on the subsequent Microsoft Active Directory, Lync 2010 - 2013 databases

What is three tier architecture? The 3 tier software architecture was comes into action in the 1990s to overcome the limitations of the 2 tier architecture. There are 3 laye

im retrieving the path of image from the database i want to get the image in that path to be displayed in my datagridviewvolumn

Prepare .NET TWAIN application to control digital imaging sensor Project Description: We are seeking somebody to create a .NET TWAIN application which will activate a digital

What is the difference between dynamic and var data types? The difference among the var and dynamic data types is that the var data type is strongly type checked at the compile

deploying a mysql vb offline desktop application in new system that doesnot have any server or database created

What is DBMS? It is a collection of programs that enables user to make and maintain a database. In other words it is general-purpose software that gives the users with the proc

ASP.NET/MSSQL/ MVC completing backend solution + integrating with frontend. Project Description: System is used for tracking company's activities through several projects by