EchoHooks: Skip onOutputPageCheckLastModified on action=raw

Bug: T279213
Change-Id: I9d3bf664f86c6dba5cc526a17bfab10303e0267d
This commit is contained in:
Timo Tijhof 2021-04-02 23:39:15 +01:00
parent 6135c62518
commit cc50ae633d

View file

@ -1208,6 +1208,12 @@ class EchoHooks implements RecentChange_saveHook {
}
public static function onOutputPageCheckLastModified( array &$modifiedTimes, OutputPage $out ) {
$req = $out->getRequest();
if ( $req->getRawVal( 'action' ) === 'raw' || $req->getRawVal( 'action' ) === 'render' ) {
// Optimisation: Avoid expensive EchoSeenTime compute on non-skin responses (T279213)
return;
}
$user = $out->getUser();
if ( $user->isLoggedIn() ) {
$notifUser = MWEchoNotifUser::newFromUser( $user );