2023-01-11 18:16:58 +08:00
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
using StartupModules;
|
|
|
|
|
|
using Yi.Framework.Core.Configuration;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Yi.Framework.Caching.Redis
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public class YiFrameworkCachingRedisModule : IStartupModule
|
|
|
|
|
|
{
|
|
|
|
|
|
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
|
|
|
|
|
{
|
|
|
|
|
|
services.Configure<CachingConnOptions>(Appsettings.appConfiguration("CachingConnOptions"));
|
2023-01-16 23:05:01 +08:00
|
|
|
|
services.AddSingleton<CacheManager, RedisCacheClient>();
|
2023-01-11 18:16:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|