ASP.NET Core 3.0 缓存(Cache)之 SQL Server 缓存

ASP.NET Core 3.0 缓存(Cache)之 MySQL 缓存

ASP.NET Core 3.0 缓存(Cache)之内存缓存(Memory Cache)

 

 

--sql server
dotnet tool install --global dotnet-sql-cache
dotnet sql-cache create "Server=192.168.0.44;User Id=sa;Password=1234;Database=Program_Test;" dbo AspNetCoreCache

--mysql
dotnet tool install --global Pomelo.Extensions.Caching.MySqlConfig.Tools --version 2.0.2
dotnet mysql-cache create "Server=192.168.0.82;User Id=sa;Password=1234;Database=program_test;Port=13306;default command timeout=100;Connection Timeout=30;Charset=utf8;" dbo AspNetCoreCache

 

sqlserver:

ASP.NET Core 3.0 缓存(Cache)之 SQL Server 、Redis、MySQL、MemoryCache缓存

 

 1 -- ----------------------------
 2             -- Table structure for AspNetCoreCache
 3             -- ----------------------------
 4             DROP TABLE [dbo].[AspNetCoreCache]
 5             GO
 6             CREATE TABLE [dbo].[AspNetCoreCache] (
 7                 [Id] nvarchar(449) NOT NULL ,
 8                 [Value] varbinary(MAX) NOT NULL ,
 9                 [ExpiresAtTime] datetimeoffset(7) NOT NULL ,
10                 [SlidingExpirationInSeconds] bigint NULL ,
11                 [AbsoluteExpiration] datetimeoffset(7) NULL 
12             )
13 
14             GO
15 
16             -- ----------------------------
17             -- Indexes structure for table AspNetCoreCache
18             -- ----------------------------
19             CREATE INDEX [Index_ExpiresAtTime] ON [dbo].[AspNetCoreCache]
20             ([ExpiresAtTime] ASC) 
21             GO
22 
23             -- ----------------------------
24             -- Primary Key structure for table AspNetCoreCache
25             -- ----------------------------
26             ALTER TABLE [dbo].[AspNetCoreCache] ADD PRIMARY KEY ([Id])
27             GO 
Sql Server

相关文章:

  • 2020-07-22
  • 2023-04-03
  • 2023-04-11
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2021-07-17
猜你喜欢
  • 2021-08-23
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
相关资源
相似解决方案