From 4860f80299b59180ae60806902d48a6939fa8c64 Mon Sep 17 00:00:00 2001 From: Janne Aalto Date: Tue, 26 Feb 2019 22:42:54 +0200 Subject: [PATCH] support for tillkrus redis-cache plugin, remove need for fork --- src/Redis.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Redis.php b/src/Redis.php index 9c142ce..b46d83f 100644 --- a/src/Redis.php +++ b/src/Redis.php @@ -13,4 +13,10 @@ ini_set('session.save_handler','redis'); ini_set('session.save_path',"tcp://$url[host]:$url[port]?auth=$url[pass]"); } + if (getenv('WP_REDIS_GLOBAL_GROUPS')) { + $groups = array_map('trim', explode(',', getenv('WP_REDIS_GLOBAL_GROUPS'))); + if (!empty($groups)) { + define('WP_REDIS_GLOBAL_GROUPS', $groups); + } + } }