CacheDefinitions.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // System.Web.Caching
  3. //
  4. // Author:
  5. // Patrik Torstensson
  6. //
  7. namespace System.Web.Caching
  8. {
  9. /// <summary>
  10. /// Specifies the relative priority of items stored in the Cache.
  11. /// </summary>
  12. public enum CacheItemPriority {
  13. Low = 1,
  14. BelowNormal = 2,
  15. Normal = 3,
  16. Default = 3,
  17. AboveNormal = 4,
  18. High = 5,
  19. NotRemovable
  20. }
  21. /// <summary>
  22. /// Specifies the reason an item was removed from the Cache.
  23. /// </summary>
  24. public enum CacheItemRemovedReason {
  25. Removed = 1,
  26. Expired = 2,
  27. Underused = 3,
  28. DependencyChanged = 4
  29. }
  30. /// <summary>
  31. /// Defines a callback method for notifying applications when a cached item is removed from the Cache.
  32. /// </summary>
  33. /// <param name="key">The index location for the item removed from the cache. </param>
  34. /// <param name="value">The Object item removed from the cache. </param>
  35. /// <param name="reason">The reason the item was removed from the cache, as specified by the CacheItemRemovedReason enumeration.</param>
  36. public delegate void CacheItemRemovedCallback(string key, object value, CacheItemRemovedReason reason);
  37. }