Let Database do the quoting of the 'group' table, so that prefixed tables will work.
[lhc/web/wiklou.git] / includes / ParserCache.php
index 8634a3b..ed4384d 100644 (file)
@@ -1,5 +1,13 @@
 <?php
+/**
+ *
+ * @package MediaWiki
+ */
 
+/**
+ *
+ * @package MediaWiki
+ */
 class ParserCache
 {
        function getKey( &$article, &$user ) {
@@ -12,7 +20,7 @@ class ParserCache
        
        function get( &$article, &$user ) {
                global $wgMemc, $wgCacheEpoch;
-               $fname = "ParserCache::get";
+               $fname = 'ParserCache::get';
                wfProfileIn( $fname );
 
                $hash = $user->getPageRenderingHash();
@@ -20,7 +28,7 @@ class ParserCache
                $key = $this->getKey( $article, $user );
                wfDebug( "Trying parser cache $key\n" );
                $value = $wgMemc->get( $key );
-               if ( $value ) {
+               if ( is_object( $value ) ) {
                        wfDebug( "Found.\n" );
                        # Delete if article has changed since the cache was made
                        $canCache = $article->checkTouched();
@@ -36,6 +44,7 @@ class ParserCache
                                $value = false;
                        }
                } else {
+                       wfDebug( "Parser cache miss.\n" );
                        $value = false;
                }