diff --git a/system/classes/template.class.php b/system/classes/template.class.php index 13cf30839..4728bb58d 100644 --- a/system/classes/template.class.php +++ b/system/classes/template.class.php @@ -2198,10 +2198,10 @@ function CACHE_create_instance($iid, $data, $bypass_lang = false, $bypass_mobile if ($TEMPLATE_OPTIONS['cache_by_language'] || $TEMPLATE_OPTIONS['cache_for_mobile']) { $directory = ''; - if ($TEMPLATE_OPTIONS['cache_by_language']) { + if (!$bypass_lang && $TEMPLATE_OPTIONS['cache_by_language']) { $directory = $_CONF['language'] . '/'; } - if ($TEMPLATE_OPTIONS['cache_for_mobile'] && $_DEVICE->is_mobile()) { + if (!$bypass_mobile && $TEMPLATE_OPTIONS['cache_for_mobile'] && $_DEVICE->is_mobile()) { $directory .= 'mobile/'; } if (!is_dir($TEMPLATE_OPTIONS['path_cache'] . $directory)) {