Skip to content

Pact Cache DistributedCacheService

welshronaldo edited this page May 30, 2022 · 8 revisions

DistributedCacheService Class

Provides a wrapper around the default DistributedCache to add common functionality

public class DistributedCacheService : Pact.Cache.DistributedCacheBase

Inheritance System.Object 🡒 DistributedCacheBase 🡒 DistributedCacheService

Methods
Get<T>(string, JsonSerializerOptions) Get the value of a specified key and convert it to a reference type
GetAsync<T>(string, JsonSerializerOptions) Retrieves a reference type from json format against the specified key
GetValue<T>(string) Get the value type of a specified key
GetValueAsync<T>(string) Retrieves a value type against the specified key
Remove(string[]) Remove specified keys
RemoveAsync(string[]) Remove specified keys
Set<T>(string, T, DistributedCacheEntryOptions, JsonSerializerOptions) Convert a reference type to a json string and store it against the specified key
SetAsync<T>(string, T, DistributedCacheEntryOptions, JsonSerializerOptions) Convert a reference type to a json string and store it against the specified key
SetValue<T>(string, T, DistributedCacheEntryOptions) Store a value type against the specified key
SetValueAsync<T>(string, T, DistributedCacheEntryOptions) Store a value type against the specified key
Clone this wiki locally