• CacheManager
  • Documentation
  • Api Docs
  • MichaCo.net
    Show / Hide Table of Contents

    Class CacheItemRemovedEventArgs

    Event arguments for cache actions.

    Inheritance
    Object
    EventArgs
    CacheItemRemovedEventArgs
    Inherited Members
    EventArgs.Empty
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:CacheManager.Core.Internal
    Assembly:CacheManager.Core.dll
    Syntax
    public sealed class CacheItemRemovedEventArgs : EventArgs

    Constructors

    | Improve this Doc View Source

    CacheItemRemovedEventArgs(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 Source

    Key

    Gets the key.

    Declaration
    public string Key { get; }
    Property Value
    Type Description
    String

    The key.

    | Improve this Doc View Source

    Level

    Gets a value indicating the cache level the event got triggered by.

    Declaration
    public int Level { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Reason

    Gets the reason flag indicating details why the CacheItem<T> has been removed.

    Declaration
    public CacheItemRemovedReason Reason { get; }
    Property Value
    Type Description
    CacheItemRemovedReason
    | Improve this Doc View Source

    Region

    Gets the region.

    Declaration
    public string Region { get; }
    Property Value
    Type Description
    String

    The region.

    | Improve this Doc View Source

    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 Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net