Interface ISyncCacheProvider<TResult>
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
stringThe 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)