Skip to content

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

welshronaldo edited this page May 30, 2022 · 5 revisions

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

Retrieves or creates a value type against the specified key

System.Threading.Tasks.Task<System.Nullable<T>> GetOrCreateValueAsync<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 (de)serialize (from)/to JSON

Clone this wiki locally