Class MemoryCacheHandle<TCacheValue>
Implementation of a cache handle using
Inherited Members
Namespace:CacheManager.MicrosoftCachingMemory
Assembly:CacheManager.Microsoft.Extensions.Caching.Memory.dll
Syntax
public class MemoryCacheHandle<TCacheValue> : BaseCacheHandle<TCacheValue>, ICache<TCacheValue>, IDisposable
Type Parameters
Name | Description |
---|---|
TCacheValue | The type of the cache value. |
Constructors
| Improve this Doc View SourceMemoryCacheHandle(ICacheManagerConfiguration, CacheHandleConfiguration, ILoggerFactory)
Initializes a new instance of the MemoryCacheHandle<TCacheValue> class.
Declaration
[CLSCompliant(false)]
public MemoryCacheHandle(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. |
MemoryCacheHandle(ICacheManagerConfiguration, CacheHandleConfiguration, ILoggerFactory, MemoryCacheOptions)
Initializes a new instance of the MemoryCacheHandle<TCacheValue> class.
Declaration
[CLSCompliant(false)]
public MemoryCacheHandle(ICacheManagerConfiguration managerConfiguration, CacheHandleConfiguration configuration, ILoggerFactory loggerFactory, MemoryCacheOptions memoryCacheOptions)
Parameters
Type | Name | Description |
---|---|---|
ICacheManagerConfiguration | managerConfiguration | The manager configuration. |
CacheHandleConfiguration | configuration | The cache handle configuration. |
ILoggerFactory | loggerFactory | The logger factory. |
MemoryCacheOptions | memoryCacheOptions | The vendor specific options. |
Properties
| Improve this Doc View SourceCount
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
CacheManager.Core.Internal.BaseCacheHandle<TCacheValue>.Count
|
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 SourceAddInternalPrepared(CacheItem<TCacheValue>)
Declaration
protected override bool AddInternalPrepared(CacheItem<TCacheValue> item)
Parameters
Type | Name | Description |
---|---|---|
CacheItem<TCacheValue> | item |
Returns
Type | Description |
---|---|
Boolean |
Overrides
CacheManager.Core.Internal.BaseCacheHandle<TCacheValue>.AddInternalPrepared(CacheManager.Core.CacheItem<TCacheValue>)
|
Improve this Doc
View Source
Clear()
Declaration
public override void Clear()
Overrides
CacheManager.Core.Internal.BaseCache<TCacheValue>.Clear()
|
Improve this Doc
View Source
ClearRegion(String)
Declaration
public override void ClearRegion(string region)
Parameters
Type | Name | Description |
---|---|---|
String | region |
Overrides
CacheManager.Core.Internal.BaseCache<TCacheValue>.ClearRegion(System.String)
|
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)
Declaration
protected override CacheItem<TCacheValue> GetCacheItemInternal(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key |
Returns
Type | Description |
---|---|
CacheItem<TCacheValue> |
Overrides
CacheManager.Core.Internal.BaseCache<TCacheValue>.GetCacheItemInternal(System.String)
|
Improve this Doc
View Source
GetCacheItemInternal(String, String)
Declaration
protected override CacheItem<TCacheValue> GetCacheItemInternal(string key, string region)
Parameters
Type | Name | Description |
---|---|---|
String | key | |
String | region |
Returns
Type | Description |
---|---|
CacheItem<TCacheValue> |
Overrides
CacheManager.Core.Internal.BaseCache<TCacheValue>.GetCacheItemInternal(System.String, System.String)
|
Improve this Doc
View Source
PutInternalPrepared(CacheItem<TCacheValue>)
Declaration
protected override void PutInternalPrepared(CacheItem<TCacheValue> item)
Parameters
Type | Name | Description |
---|---|---|
CacheItem<TCacheValue> | item |
Overrides
CacheManager.Core.Internal.BaseCacheHandle<TCacheValue>.PutInternalPrepared(CacheManager.Core.CacheItem<TCacheValue>)
|
Improve this Doc
View Source
RemoveInternal(String)
Declaration
protected override bool RemoveInternal(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key |
Returns
Type | Description |
---|---|
Boolean |
Overrides
CacheManager.Core.Internal.BaseCache<TCacheValue>.RemoveInternal(System.String)
|
Improve this Doc
View Source
RemoveInternal(String, String)
Declaration
protected override bool RemoveInternal(string key, string region)
Parameters
Type | Name | Description |
---|---|---|
String | key | |
String | region |
Returns
Type | Description |
---|---|
Boolean |
Overrides
CacheManager.Core.Internal.BaseCache<TCacheValue>.RemoveInternal(System.String, System.String)