RedisCache Class¶
- Namespace
Microsoft.Extensions.Caching.Redis
- Assemblies
- Microsoft.Extensions.Caching.Redis
Syntax¶
public class RedisCache : IDistributedCache, IDisposable
-
class
Microsoft.Extensions.Caching.Redis.
RedisCache
Constructors¶
-
RedisCache
(Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Redis.RedisCacheOptions>)¶ public RedisCache(IOptions<RedisCacheOptions> optionsAccessor)
-
Methods¶
-
Dispose
()¶ public void Dispose()
-
Get
(System.String)¶ Return type: System.Byte<System.Byte>[] public byte[] Get(string key)
-
GetAsync
(System.String)¶ Return type: System.Threading.Tasks.Task<System.Byte<System.Byte>[]> public Task<byte[]> GetAsync(string key)
-
Refresh
(System.String)¶ public void Refresh(string key)
-
RefreshAsync
(System.String)¶ Return type: System.Threading.Tasks.Task public Task RefreshAsync(string key)
-
Remove
(System.String)¶ public void Remove(string key)
-
RemoveAsync
(System.String)¶ Return type: System.Threading.Tasks.Task public Task RemoveAsync(string key)
-
Set
(System.String, System.Byte[], Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions)¶ public void Set(string key, byte[] value, DistributedCacheEntryOptions options)
-
SetAsync
(System.String, System.Byte[], Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions)¶ Return type: System.Threading.Tasks.Task public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options)
-