Page MenuHomePhabricator

Resources for anonymous users are not cached
Closed, ResolvedPublic

Description

Author: jakub

Description:
Anonymous users have mTouched set to "0" meaning that they have never been modified. But wfTimestamp() treats this value as "now" causing the exact opposite. The consequence is that static resources loaded under anonymous user are never cached.

This looks like a clear bug, even the source code comment suggest that this value should cause caching of any page. The attached patch fixes this.

This is network communication before: http://www.vrana.cz/test/mediawiki/before.png and after: http://www.vrana.cz/test/mediawiki/after.png. The difference between 1.59 s and 2.63 and the 304 status are important.


Version: 1.20.x
Severity: minor

Details

Reference
bz40899

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:09 AM
bzimport set Reference to bz40899.
bzimport added a subscriber: Unknown Object (MLST).

jakub wrote:

Fix

Attached:

sumanah wrote:

Jakub, thanks for the fix! Just so you know, in the future you can submit your changes directly into our Git repository using developer access: https://www.mediawiki.org/wiki/Developer_access

Thanks for the patch! Submitted into Gerrit as https://gerrit.wikimedia.org/r/#/c/27498/ and merged.

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptJan 28 2016, 6:13 PM