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:
function fnMyHook( $out, &$cookies ) { ... }

*Attach hook:
$wgHooks['GetCacheVaryCookies'][] = 'fnMyHook';
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