resourceloader: Disable filesystem cache for Less
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 4 Aug 2016 21:47:57 +0000 (14:47 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 4 Aug 2016 21:51:55 +0000 (14:51 -0700)
Follows-up ea862efa7, which enables use of Less_Cache as part
of the switch from leafo/lessphp to oyejorge/less.php.

Since then 12afb3607 introduced a better caching method in
FileModule::compileLessFile(), which:

* Uses APC where possible, with fallback to main objectcache.
* Verifies both the input file and the indirectly used files have
  not changed before using the cache. The built-in cache system
  only seems to check the root file.

As such, we're incurring the overhead of generating them and storing
on-disk, but raraly ever making use of them. (And even if we do
use it when the APC object first expires, it's risky due to the
lack of indirect file validation).

Bug: T121519
Change-Id: I6e3c66f86a536463488697efc166fb704be0715c

includes/resourceloader/ResourceLoader.php

index 1a93f6e..85a6954 100644 (file)
@@ -1578,7 +1578,6 @@ MESSAGE;
                        array_fill_keys( $this->config->get( 'ResourceLoaderLESSImportPaths' ), '' )
                );
                $parser->SetOption( 'relativeUrls', false );
-               $parser->SetCacheDir( $this->config->get( 'CacheDirectory' ) ?: wfTempDir() );
 
                return $parser;
        }