return false;
}
- $age = time() - wfTimestamp( TS_UNIX, $editInfo->output->getCacheTime() );
+ $age = time() - (int)wfTimestamp( TS_UNIX, $editInfo->output->getCacheTime() );
$context['age'] = $age;
$isCacheUsable = true;
// 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 {
// 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 ) ) {
) {
// 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' ) ) {