Interface IDistributedCache<TCacheItem, TCacheKey>
Assembly: Volo.Abp.Caching.dll
Syntax
public interface IDistributedCache<TCacheItem, TCacheKey> where TCacheItem : class
Type Parameters
| Name |
Description |
| TCacheItem |
|
| TCacheKey |
|
Methods
Get(TCacheKey, bool?, bool)
Declaration
TCacheItem Get(TCacheKey key, bool? hideErrors = null, bool considerUow = false)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
Returns
| Type |
Description |
| TCacheItem |
|
GetAsync(TCacheKey, bool?, bool, CancellationToken)
Declaration
Task<TCacheItem> GetAsync(TCacheKey key, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><TCacheItem> |
|
GetMany(IEnumerable<TCacheKey>, bool?, bool)
Declaration
KeyValuePair<TCacheKey, TCacheItem>[] GetMany(IEnumerable<TCacheKey> keys, bool? hideErrors = null, bool considerUow = false)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><TCacheKey> |
keys |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
Returns
| Type |
Description |
| KeyValuePair<TCacheKey, TCacheItem>[] |
|
GetManyAsync(IEnumerable<TCacheKey>, bool?, bool, CancellationToken)
Declaration
Task<KeyValuePair<TCacheKey, TCacheItem>[]> GetManyAsync(IEnumerable<TCacheKey> keys, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><TCacheKey> |
keys |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><KeyValuePair<TCacheKey, TCacheItem>[]> |
|
GetOrAdd(TCacheKey, Func<TCacheItem>, Func<DistributedCacheEntryOptions>, bool?, bool)
Declaration
TCacheItem GetOrAdd(TCacheKey key, Func<TCacheItem> factory, Func<DistributedCacheEntryOptions> optionsFactory = null, bool? hideErrors = null, bool considerUow = false)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| System.Func<TResult><TCacheItem> |
factory |
|
| System.Func<TResult><Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions> |
optionsFactory |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
Returns
| Type |
Description |
| TCacheItem |
|
GetOrAddAsync(TCacheKey, Func<Task<TCacheItem>>, Func<DistributedCacheEntryOptions>, bool?, bool, CancellationToken)
Declaration
Task<TCacheItem> GetOrAddAsync(TCacheKey key, Func<Task<TCacheItem>> factory, Func<DistributedCacheEntryOptions> optionsFactory = null, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| System.Func<TResult><System.Threading.Tasks.Task<TResult><TCacheItem>> |
factory |
|
| System.Func<TResult><Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions> |
optionsFactory |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><TCacheItem> |
|
GetOrAddMany(IEnumerable<TCacheKey>, Func<IEnumerable<TCacheKey>, List<KeyValuePair<TCacheKey, TCacheItem>>>, Func<DistributedCacheEntryOptions>, bool?, bool)
Declaration
KeyValuePair<TCacheKey, TCacheItem>[] GetOrAddMany(IEnumerable<TCacheKey> keys, Func<IEnumerable<TCacheKey>, List<KeyValuePair<TCacheKey, TCacheItem>>> factory, Func<DistributedCacheEntryOptions> optionsFactory = null, bool? hideErrors = null, bool considerUow = false)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><TCacheKey> |
keys |
|
| System.Func<T, TResult><System.Collections.Generic.IEnumerable<T><TCacheKey>, System.Collections.Generic.List<T><KeyValuePair<TCacheKey, TCacheItem>>> |
factory |
|
| System.Func<TResult><Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions> |
optionsFactory |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
Returns
| Type |
Description |
| KeyValuePair<TCacheKey, TCacheItem>[] |
|
GetOrAddManyAsync(IEnumerable<TCacheKey>, Func<IEnumerable<TCacheKey>, Task<List<KeyValuePair<TCacheKey, TCacheItem>>>>, Func<DistributedCacheEntryOptions>, bool?, bool, CancellationToken)
Declaration
Task<KeyValuePair<TCacheKey, TCacheItem>[]> GetOrAddManyAsync(IEnumerable<TCacheKey> keys, Func<IEnumerable<TCacheKey>, Task<List<KeyValuePair<TCacheKey, TCacheItem>>>> factory, Func<DistributedCacheEntryOptions> optionsFactory = null, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><TCacheKey> |
keys |
|
| System.Func<T, TResult><System.Collections.Generic.IEnumerable<T><TCacheKey>, System.Threading.Tasks.Task<TResult><System.Collections.Generic.List<T><KeyValuePair<TCacheKey, TCacheItem>>>> |
factory |
|
| System.Func<TResult><Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions> |
optionsFactory |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><KeyValuePair<TCacheKey, TCacheItem>[]> |
|
Refresh(TCacheKey, bool?)
Declaration
void Refresh(TCacheKey key, bool? hideErrors = null)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| bool? |
hideErrors |
|
RefreshAsync(TCacheKey, bool?, CancellationToken)
Declaration
Task RefreshAsync(TCacheKey key, bool? hideErrors = null, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| bool? |
hideErrors |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
RefreshMany(IEnumerable<TCacheKey>, bool?)
Declaration
void RefreshMany(IEnumerable<TCacheKey> keys, bool? hideErrors = null)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><TCacheKey> |
keys |
|
| bool? |
hideErrors |
|
RefreshManyAsync(IEnumerable<TCacheKey>, bool?, CancellationToken)
Declaration
Task RefreshManyAsync(IEnumerable<TCacheKey> keys, bool? hideErrors = null, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><TCacheKey> |
keys |
|
| bool? |
hideErrors |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Remove(TCacheKey, bool?, bool)
Declaration
void Remove(TCacheKey key, bool? hideErrors = null, bool considerUow = false)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
RemoveAsync(TCacheKey, bool?, bool, CancellationToken)
Declaration
Task RemoveAsync(TCacheKey key, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
RemoveMany(IEnumerable<TCacheKey>, bool?, bool)
Declaration
void RemoveMany(IEnumerable<TCacheKey> keys, bool? hideErrors = null, bool considerUow = false)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><TCacheKey> |
keys |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
RemoveManyAsync(IEnumerable<TCacheKey>, bool?, bool, CancellationToken)
Declaration
Task RemoveManyAsync(IEnumerable<TCacheKey> keys, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><TCacheKey> |
keys |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Set(TCacheKey, TCacheItem, DistributedCacheEntryOptions, bool?, bool)
Declaration
void Set(TCacheKey key, TCacheItem value, DistributedCacheEntryOptions options = null, bool? hideErrors = null, bool considerUow = false)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| TCacheItem |
value |
|
| Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions |
options |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
SetAsync(TCacheKey, TCacheItem, DistributedCacheEntryOptions, bool?, bool, CancellationToken)
Declaration
Task SetAsync(TCacheKey key, TCacheItem value, DistributedCacheEntryOptions options = null, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| TCacheKey |
key |
|
| TCacheItem |
value |
|
| Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions |
options |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
SetMany(IEnumerable<KeyValuePair<TCacheKey, TCacheItem>>, DistributedCacheEntryOptions, bool?, bool)
Declaration
void SetMany(IEnumerable<KeyValuePair<TCacheKey, TCacheItem>> items, DistributedCacheEntryOptions options = null, bool? hideErrors = null, bool considerUow = false)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><KeyValuePair<TCacheKey, TCacheItem>> |
items |
|
| Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions |
options |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
SetManyAsync(IEnumerable<KeyValuePair<TCacheKey, TCacheItem>>, DistributedCacheEntryOptions, bool?, bool, CancellationToken)
Declaration
Task SetManyAsync(IEnumerable<KeyValuePair<TCacheKey, TCacheItem>> items, DistributedCacheEntryOptions options = null, bool? hideErrors = null, bool considerUow = false, CancellationToken token = default)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T><KeyValuePair<TCacheKey, TCacheItem>> |
items |
|
| Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions |
options |
|
| bool? |
hideErrors |
|
| bool |
considerUow |
|
| System.Threading.CancellationToken |
token |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Extension Methods