skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 27 Sep 2018 21:23:48 +0000 (22:23 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 29 Sep 2018 01:30:36 +0000 (02:30 +0100)
commitcba0fb1c1576324e87b27b6d31ee4359195025c8
treefdba84562aaa21b19a6c4a2978a41157474b4cdb
parent6dad00ff4c8dd11fec29c3e9ddc7d4f976de60d2
skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery

For several years now, action=raw urls are automatically purged
after edits, and receive the same cache allowance as page views.

The vast majority of action=raw requests come from the
importScript() function in wikibits.js, which only specififes
'title', 'action' and 'ctype'.

The 'usemsgcache' parameter is a relic (pre-2009) for optimising
something we haven't used in a very long time.  Nothing uses the
'usemsgcache' parameter, except for the one edge-case of
third-party wikis loading Filepage.css from Commons on local
file description pages. This commit removes the handling logic,
in favour of letting the normal Revision-logic happen instead,
which is compatible and produces the same response.

Before 2009, this probably made sense as an optimisation because
we didn't have Revision text cache in Memcached yet at that time,
to avoid DB-load from InstantCommons-based file page views.

The way FileRepo was using it needlessly allowed Filepage.css
to return stale responses (given non-canonical query parameters
variations are not purged on-edit). It also caused responses to
be cached longer or shorter than they should be, due to it being
based on the client wiki's configuration, instead of the repo's
configuration (e.g. Wikimedia Commons). By omitting these
'maxage' parameters, the $wgSquidMaxage config of the repo is
used instead, which makes more sense.

Bug: T193271
Change-Id: Ie52195b56b7f8fc17dec0cbedd6d77968e3bc040
RELEASE-NOTES-1.32
includes/actions/RawAction.php
includes/filerepo/FileRepo.php
includes/skins/Skin.php
maintenance/dictionary/mediawiki.dic