using FreeRedis; namespace Cis.Core; public static class CacheSetup { /// /// Redis 缓存注册 /// /// public static void AddCache(this IServiceCollection services) { var redisOptions = App.GetOptions(); RedisClient cache = new(redisOptions.ConnectionString); cache.FlushDb(); services.AddSingleton(cache); } }