SqlServerCache Class¶
Distributed cache implementation using Microsoft SQL Server database.
- Namespace
Microsoft.Extensions.Caching.SqlServer
- Assemblies
- Microsoft.Extensions.Caching.SqlServer
Syntax¶
public class SqlServerCache : IDistributedCache
-
class
Microsoft.Extensions.Caching.SqlServer.
SqlServerCache
Constructors¶
-
SqlServerCache
(Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.SqlServer.SqlServerCacheOptions>)¶ public SqlServerCache(IOptions<SqlServerCacheOptions> options)
-
Methods¶
-
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)
-