ResourceLoaderFileModule: Do not separately cache .less files
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 20 Aug 2014 18:26:46 +0000 (20:26 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 20 Aug 2014 18:26:46 +0000 (20:26 +0200)
commit1538edce7b882d902162dc26d7bbaf51a09deae9
treeedca6502255dbc2780000a2209bf41caa6df7572
parentcd22ba020ee5f6c43028ec815257fdb26f088d66
ResourceLoaderFileModule: Do not separately cache .less files

We used to have a second level of caching for them – when a module's
cache was invalidated, individual .less files that comprise it would
only be recompiled (with all their @imports) if their mktime changed
(or if $wgResourceLoaderLESSVars changed).

Given that practice has shown that RL modules including .less files
usually just include one file that @imports tons of stuff, and given
that RL already is very careful about invalidating caches, I think
this is unnecessary at best and harmful at worst.

The behavior proved problematic when I tried to implement support for
per-module LESS variables, values of which were language-dependent –
files would not be recompiled for different languages, and
getLessCacheKey() is called several levels deep in code that doesn't
have access to the context in which the module is being compiled.

Change-Id: I667f063507583e4cd3a669e32398d440f1431f7e
includes/resourceloader/ResourceLoaderFileModule.php