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
Webservices as such do not have any mechanism by which they can maintain their state. The Webservices can access ASP.NET intrinsic objects such as application, session and many mor

How do we configure "WebGarden"? The process model configured the "Web garden" settings in the "machine.config" or in the "Web.config" file. The configuration section is named

What is denormalization? The Denormalization is the process of putting one fact in numerous places (i.e. the vice-versa of normalization). Only one valid reason exists for deno

What are the differences between ASP and ASP .Net ?  ASP: Code is Interpreted ASP.NET: Code is Compiled   ASP: Business Logic and Presentation Logic are in a one

Can a .NET web application consume Java web service? Yes Offcourse.Actually Webservices are independent  to language. It depends on WSDL and SOAP. so any one can develope the W

I need to create the subsequent iOS App/ iPhone (to be followed by Android & other platforms). Version 1.0--Users can: --Find events based on proximity/zipcode*/ location

What is a Interface? The Interface is a contract that describes the signature of the functionality. So when a class is implementing a interface it says to the outer world, that

Audio Expert in C# Required - Generate Audio Engine, Exciting Project! Project Description: We need an EXPERT CODER to help us create an 'audio engine' in C#. We need to b

What is Reflection?  It extends the advantages of metadata by allowing developers to inspect and use it at runtime. For example, dynamically determine all the classes contained

What is managed code and managed data? Managed code is code that is written to target the services of the Common Language Runtime. In order to target these services, the code m