Page MenuHomePhabricator

ResourceLoaderLanguageDataModule::getModifiedTime updates continuously
Closed, ResolvedPublic

Description

+++ This bug was initially created as a clone of Bug #56856 +++

ResourceLoaderULSModule updates its modified time whenever ResourceLoaderContext::getLanguage varies. ResourceLoaderContext::getLanguage varies gets the language via the 'lang' parameter on the module request. The lang parameter is set in mediawiki.js to wgUserLanguage.

Result: the version of ext.uls.languagenames is updated continuously as users with different language settings hit the site, with the effect that practically every request for the module (and any other module fetched in the same request) is uncached.

To confirm this bug report, you can go to enwiki and check mw.loader.getVersion('ext.uls.languagenames'); . Then reload and check again.

'mediawiki.language.data' appears to likewise update continuously.


Version: 1.23.0
Severity: major

Details

Reference
bz56894

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:28 AM
bzimport set Reference to bz56894.
bzimport added a subscriber: Unknown Object (MLST).

Note that, while the bug creeped into the generic hash cache key making in the general ResourceLoaderModule class, the bug was in the ResourceLoaderLanguageDataModule from before it adopted the hash key method.

Ib051ef41ba239084671c30fd switched lang data module from its own homebrew logic to the general one from ResourceLoaderModule, and it can be seen in the removed lines in that diff that the previous one is:

$key = wfMemcKey( 'resourceloader', 'langdatamodule', 'changeinfo' );

Which also doesn't fragment by context lang code or context hash.