-
Notifications
You must be signed in to change notification settings - Fork 1
Pact Cache DistributedCacheBase
welshronaldo edited this page May 30, 2022
·
4 revisions
Provides a wrapper around the default DistributedCache to add common functionality
public abstract class DistributedCacheBase :
Pact.Cache.IDistributedCacheService
Inheritance System.Object 🡒 DistributedCacheBase
Derived
↳ DistributedCacheService
↳ DualLayerCacheService
Implements IDistributedCacheService
Methods | |
---|---|
Get<T>(string, JsonSerializerOptions) | Get the value of a specified key and convert it to a reference type |
GetAsync<T>(string, JsonSerializerOptions) | Retrieves a reference type from json format against the specified key |
GetOrCreate<T>(string, Func<DistributedCacheEntryOptions,T>, JsonSerializerOptions) | Retrieves or creates a reference type in json format against the specified key |
GetOrCreateAsync<T>(string, Func<DistributedCacheEntryOptions,Task<T>>, JsonSerializerOptions) | Retrieves or creates a reference type in json format against the specified key |
GetOrCreateValue<T>(string, Func<DistributedCacheEntryOptions,T>) | Retrieves or creates a value type against the specified key |
GetOrCreateValueAsync<T>(string, Func<DistributedCacheEntryOptions,Task<T>>) | Retrieves or creates a value type against the specified key |
GetValue<T>(string) | Get the value type of a specified key |
GetValueAsync<T>(string) | Retrieves a value type against the specified key |
Remove(string[]) | Remove specified keys |
RemoveAsync(string[]) | Remove specified keys |
Set<T>(string, Func<DistributedCacheEntryOptions,T>, JsonSerializerOptions) | Convert a reference type to a json string and store it against the specified key |
Set<T>(string, T, DistributedCacheEntryOptions, JsonSerializerOptions) | Convert a reference type to a json string and store it against the specified key |
SetAsync<T>(string, Func<DistributedCacheEntryOptions,Task<T>>, JsonSerializerOptions) | Convert a reference type to a json string and store it against the specified key |
SetAsync<T>(string, T, DistributedCacheEntryOptions, JsonSerializerOptions) | Convert a reference type to a json string and store it against the specified key |
SetValue<T>(string, Func<DistributedCacheEntryOptions,T>) | Store a value type against the specified key |
SetValue<T>(string, T, DistributedCacheEntryOptions) | Store a value type against the specified key |
SetValueAsync<T>(string, Func<DistributedCacheEntryOptions,Task<T>>) | Store a value type against the specified key |
SetValueAsync<T>(string, T, DistributedCacheEntryOptions) | Store a value type against the specified key |