Skip to content
5 changes: 4 additions & 1 deletion libraries/src/Helper/ModuleHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,10 @@ public static function moduleCache($module, $moduleparams, $cacheparams)
$cache = \JFactory::getCache($cacheparams->cachegroup, 'callback');

// Turn cache off for internal callers if parameters are set to off and for all logged in users
if ($moduleparams->get('owncache') === 0 || $moduleparams->get('owncache') === '0' || $conf->get('caching') == 0 || $user->get('id'))
$ownCacheDisabled = $moduleparams->get('owncache') === 0 || $moduleparams->get('owncache') === '0';
$cacheDisabled = $moduleparams->get('cache') === 0 || $moduleparams->get('cache') === '0';

if ($ownCacheDisabled || $cacheDisabled || $conf->get('caching') == 0 || $user->get('id'))
{
$cache->setCaching(false);
}
Expand Down