Class DistributedCache<TCacheItem>
Inheritance
DistributedCache<TCacheItem>
Assembly: Volo.Abp.Caching.dll
Syntax
public class DistributedCache<TCacheItem> : IDistributedCache<TCacheItem>, IDistributedCache<TCacheItem, string> where TCacheItem : class
Type Parameters
Name |
Description |
TCacheItem |
|
Constructors
DistributedCache(IDistributedCache<TCacheItem, string>)
Declaration
public DistributedCache(IDistributedCache<TCacheItem, string> internalCache)
Parameters
Properties
InternalCache
Declaration
public IDistributedCache<TCacheItem, string> InternalCache { get; }
Property Value
Methods
Get(string, bool?, bool)
Declaration
public TCacheItem? Get(string key, bool? hideErrors = null, bool considerUow = false)
Parameters
Returns
Type |
Description |
TCacheItem |
|
GetAsync(string, bool?, bool, CancellationToken)
Declaration
public Task<TCacheItem?> GetAsync(string key, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
Returns
Type |
Description |
Task<TCacheItem> |
|
GetMany(IEnumerable<string>, bool?, bool)
Declaration
public KeyValuePair<string, TCacheItem?>[] GetMany(IEnumerable<string> keys, bool? hideErrors = null, bool considerUow = false)
Parameters
Returns
GetManyAsync(IEnumerable<string>, bool?, bool, CancellationToken)
Declaration
public Task<KeyValuePair<string, TCacheItem?>[]> GetManyAsync(IEnumerable<string> keys, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
Returns
GetOrAdd(string, Func<TCacheItem>, Func<DistributedCacheEntryOptions>?, bool?, bool)
Declaration
public TCacheItem? GetOrAdd(string key, Func<TCacheItem> factory, Func<DistributedCacheEntryOptions>? optionsFactory = null, bool? hideErrors = null, bool considerUow = false)
Parameters
Returns
Type |
Description |
TCacheItem |
|
GetOrAddAsync(string, Func<Task<TCacheItem>>, Func<DistributedCacheEntryOptions>?, bool?, bool, CancellationToken)
Declaration
public Task<TCacheItem?> GetOrAddAsync(string key, Func<Task<TCacheItem>> factory, Func<DistributedCacheEntryOptions>? optionsFactory = null, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
Returns
Type |
Description |
Task<TCacheItem> |
|
GetOrAddMany(IEnumerable<string>, Func<IEnumerable<string>, List<KeyValuePair<string, TCacheItem>>>, Func<DistributedCacheEntryOptions>?, bool?, bool)
Declaration
public KeyValuePair<string, TCacheItem?>[] GetOrAddMany(IEnumerable<string> keys, Func<IEnumerable<string>, List<KeyValuePair<string, TCacheItem>>> factory, Func<DistributedCacheEntryOptions>? optionsFactory = null, bool? hideErrors = null, bool considerUow = false)
Parameters
Returns
GetOrAddManyAsync(IEnumerable<string>, Func<IEnumerable<string>, Task<List<KeyValuePair<string, TCacheItem>>>>, Func<DistributedCacheEntryOptions>?, bool?, bool, CancellationToken)
Declaration
public Task<KeyValuePair<string, TCacheItem?>[]> GetOrAddManyAsync(IEnumerable<string> keys, Func<IEnumerable<string>, Task<List<KeyValuePair<string, TCacheItem>>>> factory, Func<DistributedCacheEntryOptions>? optionsFactory = null, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
Returns
Refresh(string, bool?)
Declaration
public void Refresh(string key, bool? hideErrors = null)
Parameters
RefreshAsync(string, bool?, CancellationToken)
Declaration
public Task RefreshAsync(string key, bool? hideErrors = null, CancellationToken token = default)
Parameters
Returns
RefreshMany(IEnumerable<string>, bool?)
Declaration
public void RefreshMany(IEnumerable<string> keys, bool? hideErrors = null)
Parameters
RefreshManyAsync(IEnumerable<string>, bool?, CancellationToken)
Declaration
public Task RefreshManyAsync(IEnumerable<string> keys, bool? hideErrors = null, CancellationToken token = default)
Parameters
Returns
Remove(string, bool?, bool)
Declaration
public void Remove(string key, bool? hideErrors = null, bool considerUow = false)
Parameters
RemoveAsync(string, bool?, bool, CancellationToken)
Declaration
public Task RemoveAsync(string key, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
Returns
RemoveMany(IEnumerable<string>, bool?, bool)
Declaration
public void RemoveMany(IEnumerable<string> keys, bool? hideErrors = null, bool considerUow = false)
Parameters
RemoveManyAsync(IEnumerable<string>, bool?, bool, CancellationToken)
Declaration
public Task RemoveManyAsync(IEnumerable<string> keys, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
Returns
Set(string, TCacheItem, DistributedCacheEntryOptions?, bool?, bool)
Declaration
public void Set(string key, TCacheItem value, DistributedCacheEntryOptions? options = null, bool? hideErrors = null, bool considerUow = false)
Parameters
SetAsync(string, TCacheItem, DistributedCacheEntryOptions?, bool?, bool, CancellationToken)
Declaration
public Task SetAsync(string key, TCacheItem value, DistributedCacheEntryOptions? options = null, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
Returns
SetMany(IEnumerable<KeyValuePair<string, TCacheItem>>, DistributedCacheEntryOptions?, bool?, bool)
Declaration
public void SetMany(IEnumerable<KeyValuePair<string, TCacheItem>> items, DistributedCacheEntryOptions? options = null, bool? hideErrors = null, bool considerUow = false)
Parameters
SetManyAsync(IEnumerable<KeyValuePair<string, TCacheItem>>, DistributedCacheEntryOptions?, bool?, bool, CancellationToken)
Declaration
public Task SetManyAsync(IEnumerable<KeyValuePair<string, TCacheItem>> items, DistributedCacheEntryOptions? options = null, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
Returns
Implements
Extension Methods