To help distinguish cache hits from cache misses, send a MediaWiki-Timestamp
header on ResourceLoader responses, indicating the current time as fractional
seconds since epoch, with microsecond precision.
Change-Id: I954a96ced1435a47d458de12411b257fe6b4ea34
$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 ) );
}
/**