Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is Absolute expiration and Sliding expiration?
.NET INTERVIEW QUESTIONS - What is Absolute expiration and Sliding expiration?
✍: Guest
Absolute Expiration allows one to specify the duration of the cache, starting from the time the cache is activated. The following example shows that the cache has a cache dependency specified, as well as an expiration time of one minute.
Cache.Insert("announcement", announcement, depends,_ DateTime.Now.AddMinutes(1), Nothing)
Sliding Expiration specifies that the cache will expire if a request is not made within a specified duration. Sliding expiration policy is useful whenever you have a large number of items that need to be cached, because this policy enables you to keep only the most frequently accessed items in memory. For example, the following code specifies that the cache will have a sliding duration of one minute. If a request is made 59 seconds after the cache is accessed, the validity of the cache would be reset to another minute:
Cache.Insert("announcement", announcement, depends,_ DateTime.MaxValue,_ TimeSpan.FromMinutes(1))
2009-07-28, 5284👍, 0💬
Popular Posts:
How Do You Uninstall JUnit Uninstalling JUnit is easy. Just remember these: Delete the directory tha...
What is the concept of XPOINTER? XPOINTER is used to locate data within XML document. XPOINTER can p...
What Is the Data Pump Import Utility? - Oracle DBA FAQ - Loading and Exporting Data Oracle Data Pump...
How do we enable SQL Cache Dependency in ASP.NET 2.0? Below are the broader steps to enable a SQL Ca...
What will be printed as the result of the operation below: main() { int x=10, y=15; x = x++; y = ++y...