Export (0) Print
Expand All

CacheItemPriority Enumeration

Specifies the relative priority of items stored in the Cache object.

Namespace: System.Web.Caching
Assembly: System.Web (in system.web.dll)

public enum class CacheItemPriority
public enum CacheItemPriority
public enum CacheItemPriority

 Member nameDescription
AboveNormalCache items with this priority level are less likely to be deleted as the server frees system memory than those assigned a Normal priority. 
BelowNormalCache items with this priority level are more likely to be deleted from the cache as the server frees system memory than items assigned a Normal priority. 
DefaultThe default value for a cached item's priority is Normal
HighCache items with this priority level are the least likely to be deleted from the cache as the server frees system memory. 
LowCache items with this priority level are the most likely to be deleted from the cache as the server frees system memory. 
NormalCache items with this priority level are likely to be deleted from the cache as the server frees system memory only after those items with Low or BelowNormal priority. This is the default. 
NotRemovableThe 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.  

When the Web server hosting an ASP.NET application runs low on memory, the 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 Normal.

NoteNote:

Items can always be removed from the cache programmatically, regardless of their cache priority.

The following code example uses the Insert method to add an item to the Cache object with its priority parameter set to High.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft