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

This commit is contained in:
Jon Chambers committed 2020-06-19 10:52:18 -04:00
1 parent 06b97b91e0
commit 734dc2e37a
1 file changed
+1 -1
@@ -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());
}
}