From dc9957f6a4fc0da9b664ffa81a4fe63f628eb46d Mon Sep 17 00:00:00 2001
From: Florent Torregrosa <florent.torregrosa@gmail.com>
Date: Fri, 5 Aug 2016 10:36:40 +0200
Subject: [PATCH] Issue #2765895: Currently Drush Cr or Cache Clear UI does not
 flush Redis cache.

---
 redis.module | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/redis.module b/redis.module
index caabde9..613b6cf 100644
--- a/redis.module
+++ b/redis.module
@@ -25,3 +25,13 @@ function redis_help($path, $arg) {
       return $messages;
   }
 }
+
+/**
+ * Implements hook_cache_flush().
+ */
+function redis_cache_flush() {
+  if (ClientFactory::hasClient()) {
+    $redis_client = ClientFactory::getClient();
+    $redis_client->flushAll();
+  }
+}
-- 
2.1.4

