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
Develop a windows desktop application Project Description: I am looking to get a desktop application developed. The desktop application will have the subsequent few features:

current available topics on computer graphics

Differentiate between the while and for loop in C#. The while and for loops are used to implement those units of code that require to be repeatedly executed, unless the result

Can you explain how the ASP.NET authentication process works?   The ASP.NET does not run by itself, it runs inside the process of the IIS. So there are 2  authentication layer

Project Description: i have predefined template which contains all my user details and there order details We have to create a login where a user uploads data. Mobile  Nam

Finding Maximum & Minimum Numbers - C# Program I am facing some problems in the code for Finding Maximum & Minimum Numbers. Can anybody suggest me the proper code for it.

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

What is boxing in .net


Web Application and Web Service For this part of the assignment, you are to develop a web application and web service using technologies and techniques taught in this subject