Table of Contents

Class AsyncSerializingCacheProvider<TResult, TSerialized>

Namespace
Polly.Caching
Assembly
Polly.dll
public class AsyncSerializingCacheProvider<TResult, TSerialized> : IAsyncCacheProvider<TResult>

Type Parameters

TResult
TSerialized
Inheritance
AsyncSerializingCacheProvider<TResult, TSerialized>
Implements
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 string
value TResult
ttl Ttl
cancellationToken CancellationToken
continueOnCapturedContext bool

Returns

Task

TryGetAsync(string, CancellationToken, bool)

public Task<(bool, TResult)> TryGetAsync(string key, CancellationToken cancellationToken, bool continueOnCapturedContext)

Parameters

key string
cancellationToken CancellationToken
continueOnCapturedContext bool

Returns

Task<(bool, TResult)>