X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderModule.php;h=30b2aa7949f5261c00e29211b8b54da66c1d1efe;hp=a507ad3ef17421b5819cc780de1596fb35fd9149;hb=1dee28cb5f1efd6d9e14d6cc1d0c73c3f69269b4;hpb=486905a17f33e02484897c84c3084529f9e87472 diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index a507ad3ef1..30b2aa7949 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -813,7 +813,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface { } else { // Infer changes based on definition and other metrics $summary = $this->getDefinitionSummary( $context ); - if ( !isset( $summary['_cacheEpoch'] ) ) { + if ( !isset( $summary['_class'] ) ) { throw new LogicException( 'getDefinitionSummary must call parent method' ); } $str = json_encode( $summary ); @@ -883,7 +883,9 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface { public function getDefinitionSummary( ResourceLoaderContext $context ) { return [ '_class' => static::class, - '_cacheEpoch' => $this->getConfig()->get( 'CacheEpoch' ), + // Make sure that when filter cache for minification is invalidated, + // we also change the HTTP urls and mw.loader.store keys (T176884). + '_cacheVersion' => ResourceLoader::CACHE_VERSION, ]; }