Jump to content

Manual:Hooks/LocalisationCacheRecache

From mediawiki.org
LocalisationCacheRecache
Available from version 1.16.0 (r52503, codereview)
Called when loading the localisation data into cache
Define function:
public static function onLocalisationCacheRecache( $cache, $code, &$alldata, $purgeBlobs ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"LocalisationCacheRecache": "MediaWiki\\Extension\\MyExtension\\Hooks::onLocalisationCacheRecache"
	}
}
Called from: File(s): cache/localisation/LocalisationCache.php
Function(s): recache
Interface: LocalisationCacheRecacheHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:LocalisationCacheRecache extensions.


Details

[edit]
  • $cache: The LocalisationCache object
  • $code: language code
  • &$alldata: The localisation data from core and extensions
  • &$purgeBlobs: whether to purge/update the message blob via MessageBlobStore::clear()