Do not insert page titles into querycache.qc_value
[lhc/web/wiklou.git] / includes / Storage / PageEditStash.php
index 4671d99..826d526 100644 (file)
@@ -231,7 +231,7 @@ class PageEditStash {
                        return false;
                }
 
-               $age = time() - wfTimestamp( TS_UNIX, $editInfo->output->getCacheTime() );
+               $age = time() - (int)wfTimestamp( TS_UNIX, $editInfo->output->getCacheTime() );
                $context['age'] = $age;
 
                $isCacheUsable = true;
@@ -271,7 +271,7 @@ class PageEditStash {
                        // This can be used for the initial parse, e.g. for filters or doEditContent(),
                        // but a second parse will be triggered in doEditUpdates() no matter what
                        $logger->info(
-                               "Cache for key '{key}' has 'vary-revision'; post-insertion parse inevitable.",
+                               "Cache for key '{key}' has vary-revision; post-insertion parse inevitable.",
                                $context
                        );
                } else {
@@ -281,7 +281,9 @@ class PageEditStash {
                                // Similar to the above if we didn't guess the timestamp correctly
                                'vary-revision-timestamp',
                                // Similar to the above if we didn't guess the content correctly
-                               'vary-revision-sha1'
+                               'vary-revision-sha1',
+                               // Similar to the above if we didn't guess page ID correctly
+                               'vary-page-id'
                        ];
                        foreach ( $flagsMaybeReparse as $flag ) {
                                if ( $editInfo->output->getFlag( $flag ) ) {
@@ -448,7 +450,7 @@ class PageEditStash {
        ) {
                // If an item is renewed, mind the cache TTL determined by config and parser functions.
                // Put an upper limit on the TTL for sanity to avoid extreme template/file staleness.
-               $age = time() - wfTimestamp( TS_UNIX, $parserOutput->getCacheTime() );
+               $age = time() - (int)wfTimestamp( TS_UNIX, $parserOutput->getCacheTime() );
                $ttl = min( $parserOutput->getCacheExpiry() - $age, self::MAX_CACHE_TTL );
                // Avoid extremely stale user signature timestamps (T84843)
                if ( $parserOutput->getFlag( 'user-signature' ) ) {