Jump to content

Manual:Hooks/HTMLFileCache::useFileCache

From mediawiki.org
HTMLFileCache::useFileCache
Available from version 1.24.0 (Gerrit change 160563)
Override whether a page should be cached in file cache.
Define function:
public static function onHTMLFileCache_useFileCache( IContextSource $context ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"HTMLFileCache::useFileCache": "MediaWiki\\Extension\\MyExtension\\Hooks::onHTMLFileCacheuseFileCache"
	}
}
Called from: File(s): cache/HTMLFileCache.php
Function(s): useFileCache
Interface: HTMLFileCache__useFileCacheHook.php

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


Details

[edit]

$context: An IContextSource object with information about the request being served.