Manual:Hooks/GetCacheVaryCookies

From MediaWiki.org
Jump to: navigation, search
GetCacheVaryCookies
Available from version 1.13.0
Get cookies that should vary cache options

Define function:
public static function onGetCacheVaryCookies( $out, &$cookies ) { ... }

Attach hook:
$wgHooks['GetCacheVaryCookies'][] = 'MyExtensionHooks::onGetCacheVaryCookies';
Called from: OutputPage.php

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


[edit] 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
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox