注册redis

DataMaintenance
zhangbin 2025-10-09 10:38:20 +08:00
parent 332f0f7805
commit 362639d5d9
1 changed files with 4 additions and 2 deletions

View File

@ -1,9 +1,9 @@
using System.Reflection; using Autofac;
using Autofac;
using Autofac.Extensions.DependencyInjection; using Autofac.Extensions.DependencyInjection;
using ce.autofac.extension; using ce.autofac.extension;
using IdentityServer4.AccessTokenValidation; using IdentityServer4.AccessTokenValidation;
using Infrastructure; using Infrastructure;
using Infrastructure.Cache;
using Infrastructure.Extensions.AutofacManager; using Infrastructure.Extensions.AutofacManager;
using Infrastructure.Middleware; using Infrastructure.Middleware;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
@ -24,6 +24,7 @@ using OpenAuth.Repository;
using OpenAuth.WebApi.Model; using OpenAuth.WebApi.Model;
using SqlSugar; using SqlSugar;
using Swashbuckle.AspNetCore.SwaggerUI; using Swashbuckle.AspNetCore.SwaggerUI;
using System.Reflection;
@ -198,6 +199,7 @@ namespace OpenAuth.WebApi
#region MemoryCache #region MemoryCache
services.AddMemoryCache(); services.AddMemoryCache();
services.AddSingleton<RedisCacheContext>();
#endregion #endregion
#region Cors #region Cors