You are here

function varnish_user in Varnish 6

Implements hook_user().

Flush cache on user modifications.

File

./varnish.module, line 136
varnish.module Provide drupal hooks for integration with the Varnish control layer.

Code

function varnish_user($op, &$edit, &$account, $category = NULL) {
  if (in_array($op, array(
    'insert',
    'delete',
    'after_update',
  )) && variable_get('varnish_cache_clear', VARNISH_DEFAULT_CLEAR) == VARNISH_DEFAULT_CLEAR) {
    varnish_purge_all_pages();
  }
}