Specifies the relative priority of items stored in the System.Web.Caching.Cache object.
When the Web server hosting an ASP.NET application runs low on memory, the System.Web.Caching.Cache object selectively purges items to free system memory. When an item is added to the cache, you can assign it a relative priority compared to the other items stored in the cache. Items to which you assign higher priority values are less likely to be deleted from the cache when the server is processing a large number of requests, whereas items to which you assign lower priority values are more likely to be deleted. The default is CacheItemPriority.Normal.
Items can always be removed from the cache programmatically, regardless of their cache priority.
Member Name | Description |
---|---|
AboveNormal |
Cache items with this priority level are less likely to be deleted as the server frees system memory than those assigned a CacheItemPriority.Normal priority. |
BelowNormal |
Cache items with this priority level are more likely to be deleted from the cache as the server frees system memory than items assigned a CacheItemPriority.Normal priority. |
Default |
The default value for a cached item's priority is CacheItemPriority.Normal. |
High |
Cache items with this priority level are the least likely to be deleted from the cache as the server frees system memory. |
Low |
Cache items with this priority level are the most likely to be deleted from the cache as the server frees system memory. |
Normal |
Cache items with this priority level are likely to be deleted from the cache as the server frees system memory only after those items with CacheItemPriority.Low or CacheItemPriority.BelowNormal priority. This is the default. |
NotRemovable |
The cache items with this priority level will not be automatically deleted from the cache as the server frees system memory. However, items with this priority level are removed along with other items according to the item's absolute or sliding expiration time. |