Class AsyncSerializingCacheProvider<TResult, TSerialized>
public class AsyncSerializingCacheProvider<TResult, TSerialized> : IAsyncCacheProvider<TResult>
Type Parameters
TResult
TSerialized
- Inheritance
-
AsyncSerializingCacheProvider<TResult, TSerialized>
- Implements
-
IAsyncCacheProvider<TResult>
- Inherited Members
- Extension Methods
Constructors
AsyncSerializingCacheProvider(IAsyncCacheProvider<TSerialized>, ICacheItemSerializer<TResult, TSerialized>)
public AsyncSerializingCacheProvider(IAsyncCacheProvider<TSerialized> wrappedCacheProvider, ICacheItemSerializer<TResult, TSerialized> serializer)
Parameters
wrappedCacheProvider
IAsyncCacheProvider<TSerialized>serializer
ICacheItemSerializer<TResult, TSerialized>
Methods
PutAsync(string, TResult, Ttl, CancellationToken, bool)
public Task PutAsync(string key, TResult value, Ttl ttl, CancellationToken cancellationToken, bool continueOnCapturedContext)
Parameters
key
stringvalue
TResultttl
TtlcancellationToken
CancellationTokencontinueOnCapturedContext
bool
Returns
TryGetAsync(string, CancellationToken, bool)
public Task<(bool, TResult)> TryGetAsync(string key, CancellationToken cancellationToken, bool continueOnCapturedContext)
Parameters
key
stringcancellationToken
CancellationTokencontinueOnCapturedContext
bool