From acbc72a32c357ba0d97ac96ff2cfa030a0586d34 Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Tue, 21 Nov 2017 10:21:19 +0100 Subject: [PATCH] fix name of key --- .../privatesales_family_menu.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/privatesales_family_menu/privatesales_family_menu.php b/modules/privatesales_family_menu/privatesales_family_menu.php index 32dfb31d..9d0d2b5c 100644 --- a/modules/privatesales_family_menu/privatesales_family_menu.php +++ b/modules/privatesales_family_menu/privatesales_family_menu.php @@ -23,23 +23,23 @@ class Privatesales_Family_Menu extends Module { public function hooktopMenu($params) { global $cookie, $smarty; - $id_lang = (int)$cookie->id_lang; + $id_lang = (int)$cookie->id_lang; /** * @Override cache file */ if (class_exists('CacheRedis')) { $tpl_cache_name = 'sale_privatesales_family_menu_'.(int) $cookie->id_lang.'.html'; - if (false === ($result = CacheRedis::getInstance()->get($tpl_cache_name, 'privatesales_family_menu'))) { + if (false === ($result = CacheRedis::getInstance()->get($tpl_cache_name, 'sale_privatesales_family_menu'))) { $menus = $this->getTree($cookie->id_lang); if (!$menus) { - CacheRedis::getInstance()->set($tpl_cache_name, 'privatesales_family_menu', '', CacheRedis::MEDIUM_TTL); + CacheRedis::getInstance()->set($tpl_cache_name, 'sale_privatesales_family_menu', '', CacheRedis::MEDIUM_TTL); return ""; } $smarty->assign(array( 'menus' => $menus )); $result = $this->display(__FILE__, 'menu.tpl'); - CacheRedis::getInstance()->set($tpl_cache_name, 'privatesales_family_menu', $result, CacheRedis::MEDIUM_TTL); + CacheRedis::getInstance()->set($tpl_cache_name, 'sale_privatesales_family_menu', $result, CacheRedis::MEDIUM_TTL); } } else { $filename = _PS_ROOT_DIR_.'/modules/privatesales_family_menu/menu_'.$id_lang.'.txt'; @@ -66,7 +66,7 @@ class Privatesales_Family_Menu extends Module { public function hookPrivateSales_update($params) { if (class_exists('CacheRedis')) { - CacheRedis::getInstance()->clear('sale_privatesales*'); + CacheRedis::getInstance()->clear('sale*'); } $id_langs = array(2,3); foreach ($id_langs as $key => $id_lang) {