Don't block the Redis instance when clearing the cache.

This commit is contained in:
Jon Chambers 2020-06-17 22:39:23 -04:00
parent 06b97b91e0
commit 734dc2e37a
1 changed files with 1 additions and 1 deletions

View File

@ -15,6 +15,6 @@ public class ClearCacheClusterCommand extends ConfiguredCommand<WhisperServerCon
@Override
protected void run(final Bootstrap<WhisperServerConfiguration> bootstrap, final Namespace namespace, final WhisperServerConfiguration config) {
final FaultTolerantRedisCluster cacheCluster = new FaultTolerantRedisCluster("main_cache_cluster", config.getCacheClusterConfiguration().getUrls(), config.getCacheClusterConfiguration().getTimeout(), config.getCacheClusterConfiguration().getCircuitBreakerConfiguration());
cacheCluster.useWriteCluster(connection -> connection.sync().flushall());
cacheCluster.useWriteCluster(connection -> connection.sync().flushallAsync());
}
}