< Manual:Hooks 
 
      | IsFileCacheable | |
|---|---|
| Available from version 1.10.0 Allow an extension to disable file caching on pages. | |
| Define function: | public static function onIsFileCacheable( $article ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"IsFileCacheable": "MyExtensionHooks::onIsFileCacheable"
	}
}
 | 
| Called from: | File(s): page/Article.php | 
| Interface: | IsFileCacheableHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:IsFileCacheable extensions.
Details
- $article - The article object.
Return value
- true if cacheable
- false if not cacheable
The hook isFileCacheable is not the sole determinant of whether a particular wiki page is cacheable or not. Whatever hook function you write is AND'ed with other boolean tests to determine cacheable status.
See also Manual:File cache.
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.