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

    Class ConfigurationBuilderCacheHandlePart

    Used to build a CacheHandleConfiguration.

    Inheritance
    Object
    ConfigurationBuilderCacheHandlePart
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:CacheManager.Core
    Assembly:CacheManager.Core.dll
    Syntax
    public sealed class ConfigurationBuilderCacheHandlePart

    Properties

    | Improve this Doc View Source

    And

    Gets the parent builder part to add another cache configuration. Can be used to add multiple cache handles.

    Declaration
    public ConfigurationBuilderCachePart And { get; }
    Property Value
    Type Description
    ConfigurationBuilderCachePart

    The parent builder part.

    Methods

    | Improve this Doc View Source

    Build()

    Hands back the new CacheManagerConfiguration instance.

    Declaration
    public ICacheManagerConfiguration Build()
    Returns
    Type Description
    ICacheManagerConfiguration

    The CacheManagerConfiguration.

    | Improve this Doc View Source

    DisablePerformanceCounters()

    Disables performance counters for this cache handle.

    Declaration
    public ConfigurationBuilderCacheHandlePart DisablePerformanceCounters()
    Returns
    Type Description
    ConfigurationBuilderCacheHandlePart

    The builder part.

    | Improve this Doc View Source

    DisableStatistics()

    Disables statistic gathering for this cache handle.

    This also disables performance counters as statistics are required for the counters.

    Declaration
    public ConfigurationBuilderCacheHandlePart DisableStatistics()
    Returns
    Type Description
    ConfigurationBuilderCacheHandlePart

    The builder part.

    | Improve this Doc View Source

    EnablePerformanceCounters()

    Enables performance counters for this cache handle.

    This also enables statistics, as this is required for performance counters.

    Declaration
    public ConfigurationBuilderCacheHandlePart EnablePerformanceCounters()
    Returns
    Type Description
    ConfigurationBuilderCacheHandlePart

    The builder part.

    | Improve this Doc View Source

    EnableStatistics()

    Enables statistic gathering for this cache handle.

    The statistics can be accessed via cacheHandle.Stats.GetStatistic.

    Declaration
    public ConfigurationBuilderCacheHandlePart EnableStatistics()
    Returns
    Type Description
    ConfigurationBuilderCacheHandlePart

    The builder part.

    | Improve this Doc View Source

    WithExpiration(ExpirationMode, TimeSpan)

    Sets the expiration mode and timeout of the cache handle.

    Declaration
    public ConfigurationBuilderCacheHandlePart WithExpiration(ExpirationMode expirationMode, TimeSpan timeout)
    Parameters
    Type Name Description
    ExpirationMode expirationMode

    The expiration mode.

    TimeSpan timeout

    The timeout.

    Returns
    Type Description
    ConfigurationBuilderCacheHandlePart

    The builder part.

    Exceptions
    Type Condition
    InvalidOperationException

    If expiration mode is not set to 'None', timeout cannot be zero.

    InvalidOperationException

    Thrown if expiration mode is not 'None' and timeout is zero.

    See Also
    ExpirationMode
    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net