Last modified: 2012-10-11 17:23:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42899, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40899 - Resources for anonymous users are not cached
Resources for anonymous users are not cached
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.20.x
All All
: Unprioritized minor (vote)
: 1.21.0 release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-09 22:19 UTC by Jakub Vrána
Modified: 2012-10-11 17:23 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Fix (869 bytes, patch)
2012-10-09 22:23 UTC, Jakub Vrána
Details

Description Jakub Vrána 2012-10-09 22:19:22 UTC
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.
Comment 1 Jakub Vrána 2012-10-09 22:23:02 UTC
Created attachment 11171 [details]
Fix
Comment 2 Sumana Harihareswara 2012-10-11 01:40:38 UTC
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
Comment 3 Roan Kattouw 2012-10-11 01:44:11 UTC
Thanks for the patch! Submitted into Gerrit as https://gerrit.wikimedia.org/r/#/c/27498/ and merged.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links