< Manual:Hooks 
 
      | GetCacheVaryCookies | |
|---|---|
| Available from version 1.13.0 Get cookies that should vary cache options | |
| Define function: | public static function onGetCacheVaryCookies( $out, &$cookies ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"GetCacheVaryCookies": "MyExtensionHooks::onGetCacheVaryCookies"
	}
}
 | 
| Called from: | File(s): OutputPage.php | 
| Interface: | GetCacheVaryCookiesHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:GetCacheVaryCookies extensions.
Details
- $out: OutputPage object
- &$cookies: array of cookies name, add a value to it if you want to add a cookie that have to vary cache options
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.