if ( $options['cacheReport'] ) {
$result .= "\n/* cache key: $key */";
}
- $cache->set( $key, $result );
+ // Set a TTL since HHVM's APC doesn't have any limitation or eviction logic.
+ $cache->set( $key, $result, 24 * 3600 );
} catch ( Exception $e ) {
MWExceptionHandler::logException( $e );
$this->logger->warning( 'Minification failed: {exception}', array(
$exp = min( $maxage, $smaxage );
header( 'Expires: ' . wfTimestamp( TS_RFC2822, $exp + time() ) );
}
+
+ // Send the current time expressed as fractional seconds since epoch,
+ // with microsecond precision. This helps distinguish hits from misses
+ // in edge caches.
+ header( 'MediaWiki-Timestamp: ' . microtime( true ) );
}
/**