From several weeks I've testing best cache configuration for my site. I tested Joomla cache but I think this is no good solution, at least for me, virtuemart cart not refresh and sometimes I get a blank page.
Using gk cache cart works fine but register not display messages (invalid password, user not exists...) and this is a problem for users. I've done a little fix that works fine for me, in /plugins/system/gavickExtCache/gavickExtCache.php in line 43:
Original
- Code: Select all
$options = array(
'defaultgroup' => 'page',
'browsercache' => false,
'template_name' => $name,
'caching' => false,
'excluded' => $pconfig['params']
Changes
- Code: Select all
$options = array(
'defaultgroup' => 'page',
'browsercache' => $this->params->get('browsercache', false),
'template_name' => $name,
'caching' => false,
'excluded' => $pconfig['params']
And in line 99:
Original
- Code: Select all
function onAfterRender()
{
$app = JFactory::getApplication();
if ($app->isAdmin() || JDEBUG) {
return;
}
$user = JFactory::getUser();
if ($user->get('guest')) {
//We need to check again here, because auto-login plugins have not been fired before the first aid check
$this->_cache->store();
}
}
Changes
- Code: Select all
function onAfterRender()
{
$app = JFactory::getApplication();
if ($app->isAdmin() || JDEBUG) {
return;
}
if (count($app->getMessageQueue())) {
return;
}
$user = JFactory::getUser();
if ($user->get('guest')) {
//We need to check again here, because auto-login plugins have not been fired before the first aid check
$this->_cache->store();
}
}
In this way register or login works fine and display message. The only problem is with gk cache JCH Optimizer not works fine for js files, only works the first time, when refresh page combined js dissapear and it loads all js files. This problem with native Joomla cache not occur but gk cache is more powerful (in my case around 1 - 1,5 seconds).
Is there any way to fix this?