Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/381503 )

Change subject: ResourceLoaderModule: Add cache version to definition summary
......................................................................

ResourceLoaderModule: Add cache version to definition summary

We already had a $filterCacheVersion variable, but it was
only used for the internal cache for JS and CSS minification,
which is not enough. If there is a breaking change in image
embedding or LESS compilation, modules that don't use content
hashing will need to be invalidated.

This commit renames ResourceLoader::$filterCacheVersion to
ResourceLoader::CACHE_VERSION and adds it to getDefinitionSummary().

Bug: T176884
Change-Id: Ife6efa71f310c90b9951afa02212b2cb6766e76d
---
M includes/resourceloader/ResourceLoader.php
M includes/resourceloader/ResourceLoaderModule.php
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/381503/1

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index c58bb00..12e1366 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -37,7 +37,7 @@
  */
 class ResourceLoader implements LoggerAwareInterface {
        /** @var int */
-       protected static $filterCacheVersion = 7;
+       const CACHE_VERSION = 7;
 
        /** @var bool */
        protected static $debugMode = null;
@@ -202,7 +202,8 @@
                        'resourceloader',
                        'filter',
                        $filter,
-                       self::$filterCacheVersion, md5( $data )
+                       self::CACHE_VERSION,
+                       md5( $data )
                );
 
                $result = $cache->get( $key );
diff --git a/includes/resourceloader/ResourceLoaderModule.php 
b/includes/resourceloader/ResourceLoaderModule.php
index b3c1cd1..ea949bb 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -925,6 +925,7 @@
                return [
                        '_class' => static::class,
                        '_cacheEpoch' => $this->getConfig()->get( 'CacheEpoch' 
),
+                       '_cacheVersion' => ResourceLoader::CACHE_VERSION,
                ];
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/381503
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife6efa71f310c90b9951afa02212b2cb6766e76d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to