From: Tim Starling Date: Sat, 5 Aug 2006 14:12:34 +0000 (+0000) Subject: Improved negative caching X-Git-Tag: 1.31.0-rc.0~56066 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=e46eb0fff5915e8cdc02c3c380df3769c3d16f7e;p=lhc%2Fweb%2Fwiklou.git Improved negative caching --- diff --git a/includes/MessageCache.php b/includes/MessageCache.php index b0cc2c64ce..b136097b1a 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -497,6 +497,7 @@ class MessageCache { if ( $this->mUseCache ) { $message = $this->mMemc->get( $this->mMemcKey . ':' . $title ); if ( $message == '###NONEXISTENT###' ) { + $this->mCache[$title] = false; return false; } elseif( !is_null( $message ) ) { $this->mCache[$title] = $message; @@ -524,6 +525,7 @@ class MessageCache { # Negative caching # Use some special text instead of false, because false gets converted to '' somewhere $this->mMemc->set( $this->mMemcKey . ':' . $title, '###NONEXISTENT###', $this->mExpiry ); + $this->mCache[$title] = false; } return $message;