Manual:Hooks/ValidateExtendedMetadataCache
From Linux Web Expert
ValidateExtendedMetadataCache | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 78926)</tvar></translate> Called to validate the cached metadata in FormatMetadata::getExtendedMeta (return false means cache will be invalidated and the GetExtendedMetadata hook will called again). | |
<translate> Define function:</translate> | public static function onValidateExtendedMetadataCache( $timestamp, File $file ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ValidateExtendedMetadataCache": "MediaWiki\\Extension\\MyExtension\\Hooks::onValidateExtendedMetadataCache"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> media/FormatMetadata.php <translate> Function(s):</translate> fetchExtendedMetadata |
<translate> Interface:</translate> | ValidateExtendedMetadataCacheHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ValidateExtendedMetadataCache extensions</tvar>.</translate>
Details
$timestamp
: The timestamp metadata was generated$file
: The file the metadata is for