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
What are advantages of SQL 2000 over SQl 7.0? 1)User-Defined Functions: The User-Defined Functions (UDFs) -- one or moreTransact-SQL statements may be used to encapsulate the

What is a class? A class explains all the attributes of objects, as well as the methods that execute the behavior of member objects. It is a comprehensive data type, which show

how can i construct er diagram for payroll managment

What is serialization, how it works in .NET? Serialization is when you persist the state of an object to a storage medium so an exact copy can be re-created at a later stage. S

Small website using ASP.NET MVC 4 EntityFramework 5 Project Description: We are seeking a developer to a ASP.NET MVC4 EntityFramework website using the subsequent tools: Visu

Develop Skype Recorder Application + Setup + Sourcecode + NICE UI Project Description: i need an application built which will allow user to record skype audio or video calls

Project Description: I am having a table available in excel format and features the subsequent: - It has about 170000 rows - Some text is longer than 255 in length. - S

What is assembly? Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, a

Give a brief introduction on side-by-side execution. Can two applications, one using private assembly and the other using the shared assembly be stated as side-by-side executables?

What are LINQ query expressions? A LINQ query, also known as a query expression, having of a combination of query clauses that identify the data sources for the query. It conta