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

    Class BucketCacheHandle<TCacheValue>

    Cache handle implementation based on the couchbase .net client.

    Inheritance
    Object
    BaseCache<TCacheValue>
    BaseCacheHandle<TCacheValue>
    BucketCacheHandle<TCacheValue>
    Inherited Members
    BaseCacheHandle<TCacheValue>.Configuration
    BaseCacheHandle<TCacheValue>.Stats
    BaseCacheHandle<TCacheValue>.Update(String, Func<TCacheValue, TCacheValue>, Int32)
    BaseCacheHandle<TCacheValue>.Update(String, String, Func<TCacheValue, TCacheValue>, Int32)
    BaseCacheHandle<TCacheValue>.AddInternal(CacheItem<TCacheValue>)
    BaseCacheHandle<TCacheValue>.PutInternal(CacheItem<TCacheValue>)
    BaseCacheHandle<TCacheValue>.TriggerCacheSpecificRemove(String, String, CacheItemRemovedReason, Object)
    BaseCacheHandle<TCacheValue>.GetItemExpiration(CacheItem<TCacheValue>)
    BaseCache<TCacheValue>.Disposed
    BaseCache<TCacheValue>.Disposing
    BaseCache<TCacheValue>.Item[String]
    BaseCache<TCacheValue>.Item[String, String]
    BaseCache<TCacheValue>.Add(String, TCacheValue)
    BaseCache<TCacheValue>.Add(String, TCacheValue, String)
    BaseCache<TCacheValue>.Add(CacheItem<TCacheValue>)
    BaseCache<TCacheValue>.Dispose()
    BaseCache<TCacheValue>.Get(String)
    BaseCache<TCacheValue>.Get(String, String)
    BaseCache<TCacheValue>.Get<TOut>(String)
    BaseCache<TCacheValue>.Get<TOut>(String, String)
    BaseCache<TCacheValue>.GetCacheItem(String)
    BaseCache<TCacheValue>.GetCacheItem(String, String)
    BaseCache<TCacheValue>.Put(String, TCacheValue)
    BaseCache<TCacheValue>.Put(String, TCacheValue, String)
    BaseCache<TCacheValue>.Put(CacheItem<TCacheValue>)
    BaseCache<TCacheValue>.Remove(String)
    BaseCache<TCacheValue>.Remove(String, String)
    BaseCache<TCacheValue>.CheckDisposed()
    BaseCache<TCacheValue>.GetCasted<TOut>(Object)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:CacheManager.Couchbase
    Assembly:CacheManager.Couchbase.dll
    Syntax
    public class BucketCacheHandle<TCacheValue> : BaseCacheHandle<TCacheValue>, ICache<TCacheValue>, IDisposable
    Type Parameters
    Name Description
    TCacheValue

    The type of the cache value.

    Constructors

    | Improve this Doc View Source

    BucketCacheHandle(ICacheManagerConfiguration, CacheHandleConfiguration, ILoggerFactory)

    Initializes a new instance of the BucketCacheHandle<TCacheValue> class.

    Declaration
    public BucketCacheHandle(ICacheManagerConfiguration managerConfiguration, CacheHandleConfiguration configuration, ILoggerFactory loggerFactory)
    Parameters
    Type Name Description
    ICacheManagerConfiguration managerConfiguration

    The manager configuration.

    CacheHandleConfiguration configuration

    The cache handle configuration.

    ILoggerFactory loggerFactory

    The logger factory.

    Exceptions
    Type Condition
    InvalidOperationException

    If configuration.HandleName is not valid.

    | Improve this Doc View Source

    BucketCacheHandle(ICacheManagerConfiguration, CacheHandleConfiguration, ILoggerFactory, BucketCacheHandleAdditionalConfiguration)

    Initializes a new instance of the BucketCacheHandle<TCacheValue> class.

    Declaration
    public BucketCacheHandle(ICacheManagerConfiguration managerConfiguration, CacheHandleConfiguration configuration, ILoggerFactory loggerFactory, BucketCacheHandleAdditionalConfiguration additionalSettings)
    Parameters
    Type Name Description
    ICacheManagerConfiguration managerConfiguration

    The manager configuration.

    CacheHandleConfiguration configuration

    The cache handle configuration.

    ILoggerFactory loggerFactory

    The logger factory.

    BucketCacheHandleAdditionalConfiguration additionalSettings

    The additional settings.

    Exceptions
    Type Condition
    InvalidOperationException

    If configuration.HandleName is not valid.

    Properties

    | Improve this Doc View Source

    Count

    Gets the number of items the cache handle currently maintains.

    Declaration
    public override int Count { get; }
    Property Value
    Type Description
    Int32

    The count.

    Overrides
    CacheManager.Core.Internal.BaseCacheHandle<TCacheValue>.Count
    | Improve this Doc View Source

    IsDistributedCache

    Declaration
    public override bool IsDistributedCache { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    CacheManager.Core.Internal.BaseCacheHandle<TCacheValue>.IsDistributedCache
    | Improve this Doc View Source

    Logger

    Declaration
    protected override ILogger Logger { get; }
    Property Value
    Type Description
    ILogger
    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.Logger

    Methods

    | Improve this Doc View Source

    AddInternalPrepared(CacheItem<TCacheValue>)

    Adds a value to the cache.

    Declaration
    protected override bool AddInternalPrepared(CacheItem<TCacheValue> item)
    Parameters
    Type Name Description
    CacheItem<TCacheValue> item

    The CacheItem to be added to the cache.

    Returns
    Type Description
    Boolean

    true if the key was not already added to the cache, false otherwise.

    Overrides
    CacheManager.Core.Internal.BaseCacheHandle<TCacheValue>.AddInternalPrepared(CacheManager.Core.CacheItem<TCacheValue>)
    | Improve this Doc View Source

    Clear()

    Clears this cache, removing all items in the base cache and all regions.

    Declaration
    public override void Clear()
    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.Clear()
    | Improve this Doc View Source

    ClearRegion(String)

    Clears the cache region, removing all items from the specified region only.

    Declaration
    public override void ClearRegion(string region)
    Parameters
    Type Name Description
    String region

    The cache region.

    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.ClearRegion(System.String)
    Exceptions
    Type Condition
    NotImplementedException

    Not supported in this version.

    | Improve this Doc View Source

    Dispose(Boolean)

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    protected override void Dispose(bool disposeManaged)
    Parameters
    Type Name Description
    Boolean disposeManaged

    Indicator if managed resources should be released.

    Overrides
    CacheManager.Core.Internal.BaseCacheHandle<TCacheValue>.Dispose(System.Boolean)
    | Improve this Doc View Source

    Exists(String)

    Declaration
    public override bool Exists(string key)
    Parameters
    Type Name Description
    String key
    Returns
    Type Description
    Boolean
    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.Exists(System.String)
    | Improve this Doc View Source

    Exists(String, String)

    Declaration
    public override bool Exists(string key, string region)
    Parameters
    Type Name Description
    String key
    String region
    Returns
    Type Description
    Boolean
    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.Exists(System.String, System.String)
    | Improve this Doc View Source

    GetCacheItemInternal(String)

    Gets a CacheItem for the specified key.

    Declaration
    protected override CacheItem<TCacheValue> GetCacheItemInternal(string key)
    Parameters
    Type Name Description
    String key

    The key being used to identify the item within the cache.

    Returns
    Type Description
    CacheItem<TCacheValue>

    The CacheItem.

    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.GetCacheItemInternal(System.String)
    | Improve this Doc View Source

    GetCacheItemInternal(String, String)

    Gets a CacheItem for the specified key.

    Declaration
    protected override CacheItem<TCacheValue> GetCacheItemInternal(string key, string region)
    Parameters
    Type Name Description
    String key

    The key being used to identify the item within the cache.

    String region

    The cache region.

    Returns
    Type Description
    CacheItem<TCacheValue>

    The CacheItem.

    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.GetCacheItemInternal(System.String, System.String)
    | Improve this Doc View Source

    PutInternalPrepared(CacheItem<TCacheValue>)

    Puts the item into the cache. If the item exists it will get updated with the new value. If the item doesn't exist, the item will be added to the cache.

    Declaration
    protected override void PutInternalPrepared(CacheItem<TCacheValue> item)
    Parameters
    Type Name Description
    CacheItem<TCacheValue> item

    The CacheItem to be added to the cache.

    Overrides
    CacheManager.Core.Internal.BaseCacheHandle<TCacheValue>.PutInternalPrepared(CacheManager.Core.CacheItem<TCacheValue>)
    | Improve this Doc View Source

    RemoveInternal(String)

    Removes a value from the cache for the specified key.

    Declaration
    protected override bool RemoveInternal(string key)
    Parameters
    Type Name Description
    String key

    The key being used to identify the item within the cache.

    Returns
    Type Description
    Boolean

    true if the key was found and removed from the cache, false otherwise.

    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.RemoveInternal(System.String)
    | Improve this Doc View Source

    RemoveInternal(String, String)

    Removes a value from the cache for the specified key.

    Declaration
    protected override bool RemoveInternal(string key, string region)
    Parameters
    Type Name Description
    String key

    The key being used to identify the item within the cache.

    String region

    The cache region.

    Returns
    Type Description
    Boolean

    true if the key was found and removed from the cache, false otherwise.

    Overrides
    CacheManager.Core.Internal.BaseCache<TCacheValue>.RemoveInternal(System.String, System.String)
    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net