Added $purgeBlobs flag to LocalisationCacheRecache hook
* This helps replace the WMF live hack to skip calling clear() Change-Id: I37bd6cf87e72b6d32e4c6c261abe2a0ef43d067e
This commit is contained in:
parent
247b8ede25
commit
7bd3a8c576
2 changed files with 4 additions and 2 deletions
|
|
@ -1546,6 +1546,7 @@ cache.
|
|||
$cache: The LocalisationCache object
|
||||
$code: language code
|
||||
&$alldata: The localisation data from core and extensions
|
||||
&purgeBlobs: whether to purge/update the message blobs via MessageBlobStore::clear()
|
||||
|
||||
'LocalisationChecksBlacklist': When fetching the blacklist of
|
||||
localisation checks.
|
||||
|
|
|
|||
5
includes/cache/LocalisationCache.php
vendored
5
includes/cache/LocalisationCache.php
vendored
|
|
@ -923,7 +923,8 @@ class LocalisationCache {
|
|||
$allData['list'][$key] = array_keys( $allData[$key] );
|
||||
}
|
||||
# Run hooks
|
||||
wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData ) );
|
||||
$purgeBlobs = true;
|
||||
wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData, &$purgeBlobs ) );
|
||||
|
||||
if ( is_null( $allData['namespaceNames'] ) ) {
|
||||
wfProfileOut( __METHOD__ );
|
||||
|
|
@ -958,7 +959,7 @@ class LocalisationCache {
|
|||
# Clear out the MessageBlobStore
|
||||
# HACK: If using a null (i.e. disabled) storage backend, we
|
||||
# can't write to the MessageBlobStore either
|
||||
if ( !$this->store instanceof LCStoreNull ) {
|
||||
if ( $purgeBlobs && !$this->store instanceof LCStoreNull ) {
|
||||
MessageBlobStore::clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue