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
Why does an organization need to manage the workloads? The workload can be explained as an independent service or a set of code that can be implemented. It can be everything f

What are the different types of replication supported by SQL SERVER? There are 3  types of replication supported by SQL SERVER which are shown below:- 1) Snapshot Replicati

What are resource files? The Resource files are the files which contain program resources. Many programmers think that resource files are used only for storing strings. But you

What is Cache Callback? The Cache object is dependent on its dependencies for example time based, file based, etc...The Cache items remove the object when cache dependencies ch

What are the components of WF 4.0? WF having of various components that work together to make desired workflow. The components of WF are given as follows: Workflows and a

Project Description: My project is to construct for me an application that emulates the http requests made in a webapp. It will need a lot of dedication and skill in C#,.net,

What is DCOM? DCOM is different from COM in that it allows for creating objects distributed around  a network, and a protocol for invoking that object's methods, & secures the

Are you available to discuss about my project. I'd like you to show first and then accept the project provided if we both agree to continue with each other. Skills required:

What is XML DOM? The DOM stands for Document Object Model, which explains the logical formation of documents and provides the way to access and manipulate a document. It suppli

Question: (a) Using the help of a diagram, describe the layer of the .NET framework that sits between Visual Basic.NET 2005 and the operating system. (b) Explain the charac