October 2010
Intermediate to advanced
1920 pages
73h 55m
English
When you add an item to the Cache, you can specify a particular priority for the item. Specifying a priority provides you with some control over when an item gets evicted from the Cache. For example, you can indicate that one cached item is more important than other cache items so that when memory resources become low, the important item is not evicted as quickly as other items.
You can specify any of the following values of the CacheItemPriority enumeration to indicate the priority of a cached item:
• AboveNormal
• BelowNormal
• Default
• High
• Low
• Normal
• NotRemovable
For example, the following line of code adds an item to the cache with a maximum absolute expiration time and a cache item priority of
Read now
Unlock full access