Skip to content

Commit

Permalink
Merge pull request #161 from fiveminuteargument/patch-1
Browse files Browse the repository at this point in the history
Prevent system messages from being cached
  • Loading branch information
chdemko committed Mar 25, 2012
2 parents 4ed997e + a52a4d3 commit 8af6c9c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/system/cache/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ function onAfterInitialise()
return;
}

if (count($app->getMessageQueue())) {
return;
}

if ($user->get('guest') && $_SERVER['REQUEST_METHOD'] == 'GET') {
$this->_cache->setCaching(true);
}
Expand Down Expand Up @@ -85,6 +89,10 @@ function onAfterRender()
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
Expand Down

0 comments on commit 8af6c9c

Please sign in to comment.