Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions
Extension methods for setting data in an IDistributedCache.
Gets a string from the specified cache with the specified key.
public static Task<string> GetStringAsync(this IDistributedCache cache, string key, CancellationToken token = default)
Asynchronously gets a string from the specified cache with the specified key.
Sets a sequence of bytes in the specified cache with the specified key.
public static Task SetAsync(this IDistributedCache cache, string key, byte[] value, CancellationToken token = default)
Asynchronously sets a sequence of bytes in the specified cache with the specified key.
Sets a string in the specified cache with the specified key.
public static void SetString(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options)
Sets a string in the specified cache with the specified key.
public static Task SetStringAsync(this IDistributedCache cache, string key, string value, CancellationToken token = default)
Asynchronously sets a string in the specified cache with the specified key.
public static Task SetStringAsync(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options, CancellationToken token = default)
Asynchronously sets a string in the specified cache with the specified key.