I am a developer working on a module for Joomla 5.
I have set Joomla’s cache to "ON - Conservative caching", and the module's cache is set to "Global".
When a guest user visits the site, Joomla caches the entire module, and everything works fine.
However, when a logged-in user accesses the site, Joomla no longer caches the module and calls tmpl.php on every request.
I checked the Joomla core file:
Path: libraries/src/Helper/ModuleHelper.php
Line: 591
Code: Select all
if ($ownCacheDisabled || $cacheDisabled || $app->get('caching') == 0 || $user->id) {
$cache->setCaching(false);
}
I need my module to be cached under all conditions.
Note:
I don’t want to use Joomla's Page Cache Plugin because it caches the entire page.
I only want this specific module to be cached, not the whole page.
thank you