Skip to content

Pact Cache IDistributedCacheService SetValueAsync T (string System Func Microsoft Extensions Caching Distributed DistributedCacheEntryOptions System Threading Tasks Task T )

welshronaldo edited this page May 30, 2022 · 5 revisions

IDistributedCacheService.SetValueAsync<T>(string, Func<DistributedCacheEntryOptions,Task<T>>) Method

Store a value type against the specified key

System.Threading.Tasks.Task<System.Nullable<T>> SetValueAsync<T>(string key, System.Func<Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions,System.Threading.Tasks.Task<T>> factory)
    where T : struct;

Type parameters

T

Parameters

key System.String

factory System.Func<Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions,System.Threading.Tasks.Task<T>>

Returns

System.Threading.Tasks.Task<System.Nullable<T>>

Remarks

Does NOT internally serialize to JSON

Clone this wiki locally