From 03ad1434bd48ed5786e388f84f3548ce421abde7 Mon Sep 17 00:00:00 2001 From: Ken Matsui Date: Thu, 14 Nov 2013 16:24:58 +0900 Subject: [PATCH] redis.cache.flushallonstop configuration option for skipping flushAll process on stopping in redis-plugin --- src/play/modules/redis/RedisCacheImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/play/modules/redis/RedisCacheImpl.java b/src/play/modules/redis/RedisCacheImpl.java index 985318c..d31bd2a 100644 --- a/src/play/modules/redis/RedisCacheImpl.java +++ b/src/play/modules/redis/RedisCacheImpl.java @@ -229,7 +229,9 @@ public boolean safeDelete(String key) { @Override public void stop() { - getCacheConnection().flushAll(); + if (Play.configuration.getProperty("redis.cache.flushallonstop", "true").equals("true")) { + getCacheConnection().flushAll(); + } connectionPool.destroy(); }