Table of Contents

Interface ISyncCacheProvider<TResult>

Namespace
Polly.Caching
Assembly
Polly.dll

Defines methods for classes providing synchronous cache functionality for Polly CachePolicy<TResult>s.

public interface ISyncCacheProvider<TResult>

Type Parameters

TResult
Extension Methods

Methods

Get(string)

Gets a value from cache.

TResult Get(string key)

Parameters

key string

The cache key.

Returns

TResult

The value from cache; or null, if none was found.

Put(string, TResult, Ttl)

Puts the specified value in the cache.

void Put(string key, TResult value, Ttl ttl)

Parameters

key string

The cache key.

value TResult

The value to put into the cache.

ttl Ttl

The time-to-live for the cache entry.