public void ReLoadRedis() { try { RedisConfig = RedisSettingFactory.Load(); ICacheSerializer serializer = RedisConfig.Serializer == StorageMode.Protobuf ? (ICacheSerializer) new ProtobufCacheSerializer() : new JsonCacheSerializer(Encoding.UTF8); RedisConnectionPool.Initialize(new RedisPoolSetting() { Host = RedisConfig.Host, ReadOnlyHost = RedisConfig.Host, MaxWritePoolSize = 2, MaxReadPoolSize = 2, DbIndex = RedisConfig.Db }, serializer); var _redisSection = ConfigManager.Configger.GetFirstOrAddConfig <RedisSection>(); if (_redisSection == null) { } } catch (Exception ex) { TraceLog.WriteError("ReLoadRedis error:{0}", ex); } }
private void Save() { RedisSettingFactory.Save(settingPropertyGrid.SelectedObject as RedisSetting); }