Skip to content

Pact Cache IDistributedCacheService GetOrCreateValue T (string System Func Microsoft Extensions Caching Distributed DistributedCacheEntryOptions T )

welshronaldo edited this page May 30, 2022 · 5 revisions

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

Retrieves or creates a value type against the specified key

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

Type parameters

T

Parameters

key System.String

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

Returns

System.Nullable<T>

Remarks

Does NOT internally (de)serialize (from)/to JSON

Clone this wiki locally