CacheDefinitions.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // System.Web.Caching
  3. //
  4. // Author:
  5. // Patrik Torstensson ([email protected])
  6. //
  7. // (C) Copyright Patrik Torstensson, 2001
  8. //
  9. namespace System.Web.Caching
  10. {
  11. /// <summary>
  12. /// Specifies the relative priority of items stored in the Cache.
  13. /// </summary>
  14. public enum CacheItemPriority {
  15. Low = 1,
  16. BelowNormal = 2,
  17. Normal = 3,
  18. Default = 3,
  19. AboveNormal = 4,
  20. High = 5,
  21. NotRemovable
  22. }
  23. /// <summary>
  24. /// Specifies the rate at which the priority of items stored in the Cache are downgraded when not accessed frequently.
  25. /// </summary>
  26. public enum CacheItemPriorityDecay {
  27. Default,
  28. Fast,
  29. Medium,
  30. Never,
  31. Slow
  32. }
  33. /// <summary>
  34. /// Specifies the reason an item was removed from the Cache.
  35. /// </summary>
  36. public enum CacheItemRemovedReason {
  37. Expired = 1,
  38. Removed = 2,
  39. Underused = 3,
  40. DependencyChanged = 4
  41. }
  42. /// <summary>
  43. /// Defines a callback method for notifying applications when a cached item is removed from the Cache.
  44. /// </summary>
  45. /// <param name="key">The index location for the item removed from the cache. </param>
  46. /// <param name="value">The Object item removed from the cache. </param>
  47. /// <param name="reason">The reason the item was removed from the cache, as specified by the CacheItemRemovedReason enumeration.</param>
  48. public delegate void CacheItemRemovedCallback(string key, object value, CacheItemRemovedReason reason);
  49. }