Manual:Hooks/SetupAfterCache
SetupAfterCache | |
---|---|
Available from version 1.14.0 Called in Setup.php, after cache objects are set |
|
Define function: |
public static function onSetupAfterCache( ) { ... }
|
Attach hook: |
In extension.json: {
"Hooks": {
"SetupAfterCache": "MyExtensionHooks::onSetupAfterCache"
}
}
|
Called from: | File(s): Setup.php |
Interface: | SetupAfterCacheHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:SetupAfterCache extensions.
SetupAfterCache should only be used for initialization that actually needs to run right after $wgMemc stuff is created. Everything else should use $wgExtensionFunctions. If you need to use the RequestContext, consider BeforeInitialize and ApiBeforeMain hooks instead.