Home > ASP.NET, General, Uncategorized > HttpRunTime Cache vs Enterprise Library Cache

HttpRunTime Cache vs Enterprise Library Cache

This post aims to highlight the differences between the cache implementation of HttpRunTime and EnterpriseLibrary

HttpRuntime.Cache Enterprise Library Caching Block
Standard Actions
Add Item to Cache
Read Item from Cache
Update Item to Cache (using insert) (using add)
Delete Item from Cache
Flush all Items in Cache
Enumeration Actions
Enumerate all items in cache
Employ LINQ Expressions
Cache Dependencies
Cache Dependency – File
Cache Dependency – Other Cache Item (write your own extension)
Expirations
Expiration – Absolute Time
Expiration  – Sliding Time
Expiration – Extended Formats

* Extended time format

“<Minute> <Hour> <Day of month> <Month> <Day of week>”

* means run every period

Examples

o “* * * * *” expires every minute

o “5 * * * *” expire 5th minute of every hour

o “* 21 * * *” expire every minute of the 21st hour of every day

o “31 15 * * *” expire 3:31 PM every day

o “7 4 * * 6” expire Saturday 4:07 AM

o “15 21 4 7 *” expire 9:15 PM on 4 July

Others
Item priority
Run function when item is removed
Get number of items in cache
Limit number of items in cache
Can use persistent Storage
Run function to refresh item when expires
Categories: ASP.NET, General, Uncategorized
  1. January 20, 2012 at 1:27 am

    “Run function when item is removed” is for HttpRuntime Cache, and “Run function to refresh item when expires” is for Enterprise library cache?

    When an item expires, the HttpRuntime cache triggers the removed function. So both should satisfy the last row.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: