Class CacheItemRemovedEventArgs
Event arguments for cache actions.
Inherited Members
Namespace:CacheManager.Core.Internal
Assembly:CacheManager.Core.dll
Syntax
public sealed class CacheItemRemovedEventArgs : EventArgs
Constructors
| Improve this Doc View SourceCacheItemRemovedEventArgs(String, String, CacheItemRemovedReason, Object, Int32)
Initializes a new instance of the CacheItemRemovedEventArgs class.
Declaration
public CacheItemRemovedEventArgs(string key, string region, CacheItemRemovedReason reason, object value, int level = 0)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key. |
String | region | The region. |
CacheItemRemovedReason | reason | The reason. |
Object | value | The original cached value which got removed. Might be null depending on the cache sub system. |
Int32 | level | The cache level the event got triggered by. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If key is null. |
Properties
| Improve this Doc View SourceKey
Gets the key.
Declaration
public string Key { get; }
Property Value
Type | Description |
---|---|
String | The key. |
Level
Gets a value indicating the cache level the event got triggered by.
Declaration
public int Level { get; }
Property Value
Type | Description |
---|---|
Int32 |
Reason
Gets the reason flag indicating details why the CacheItem<T> has been removed.
Declaration
public CacheItemRemovedReason Reason { get; }
Property Value
Type | Description |
---|---|
CacheItemRemovedReason |
Region
Gets the region.
Declaration
public string Region { get; }
Property Value
Type | Description |
---|---|
String | The region. |
Value
Gets the original cached value which was removed by this event.
The property might return Null
if the underlying cache system doesn't
support returning the value on eviction (for example Redis).
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
Object |
Methods
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |