clearCache($template, self::$moduleName . ($cache_id !== null ? '|' . trim($cache_id, '|') : '')); } public static function clearCacheBoSmarty($template, $name = null, $before = null, $after = null) { return Module::getInstanceByName(self::$moduleName)->clearCache($template, self::getCachedId($name, $before, $after)); } public static function clearCacheFoSmarty($template, $name = null, $before = null, $after = null) { $module = Module::getInstanceByName(self::$moduleName); return $module->clearCache($template, $module->getCacheId($name, $before, $after)); } public static function getCachedId($name = null, $before = null, $after = null) { if (!(int)Configuration::get('ETS_RV_CACHE_ENABLED')) return null; $context = Context::getContext(); $cache_id = self::$moduleName . (trim(Tools::strtolower($name)) ? '|' . trim(Tools::strtolower($name)) : '') . (is_array($before) ? '|' . implode('|', $before) : ($before ? '|' . trim($before, '|') : '')); if (Configuration::get('PS_SSL_ENABLED')) { $cache_id .= '|' . (int)Tools::usingSecureMode(); } if (Shop::isFeatureActive()) { $cache_id .= '|' . (int)$context->shop->id; } if (isset($context->employee)) { $cache_id .= '|' . (int)$context->employee->id; } if (Language::isMultiLanguageActivated()) { $cache_id .= '|' . (int)$context->language->id; } return $cache_id . (is_array($after) ? '|' . implode('|', $after) : ($after ? '|' . trim($after, '|') : '')); } }