Permalink
Browse files

Added check for system messages to ensure that, if any are present, p…

…ages are not fetched from cache, or cached
  • Loading branch information...
1 parent 98ec757 commit ff75fa8544ff33a66a1ae144455e1ad7087aa413 @fiveminuteargument fiveminuteargument committed Mar 21, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 plugins/system/cache/cache.php
@@ -55,6 +55,12 @@ function onAfterInitialise()
return;
}
+ $messages = $app->getMessageQueue();
+
+ if (is_array($messages) && count($messages)) {
+ return;
+ }
+
if ($user->get('guest') && $_SERVER['REQUEST_METHOD'] == 'GET') {
$this->_cache->setCaching(true);
}
@@ -85,6 +91,12 @@ function onAfterRender()
return;
}
+ $messages = $app->getMessageQueue();
+
+ if (is_array($messages) && count($messages)) {
+ 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

0 comments on commit ff75fa8

Please sign in to comment.