diff --git a/sites/all/modules/unl/unl_varnish/unl_varnish.module b/sites/all/modules/unl/unl_varnish/unl_varnish.module index 0fe2f0d4d29b23f85b64b4b644f8fbf03da57c00..2ba80c4337e35a39aa80634e1c2facede0a3b4df 100644 --- a/sites/all/modules/unl/unl_varnish/unl_varnish.module +++ b/sites/all/modules/unl/unl_varnish/unl_varnish.module @@ -44,27 +44,19 @@ function unl_varnish_purge_submit($form, &$form_state) { * Implements hook_file_insert(). */ function unl_varnish_file_insert($file) { - _unl_varnish_purge_file($file); + varnish_purge_all_pages(); } /** * Implements hook_file_update(). */ function unl_varnish_file_update($file) { - _unl_varnish_purge_file($file); + varnish_purge_all_pages(); } /** - * Instructs varnish to purge the given file from its cache. - * @param stdClass $file as provided by hook_file_[insert,update] + * Implements hook_node_update(). */ -function _unl_varnish_purge_file($file) { - $url = parse_url(file_create_url($file->uri)); - $host = $url['host']; - $path = $url['path']; - - $command = "purge req.http.host == $host && req.url ~ ^$path\$"; - _varnish_terminal_run($command); +function unl_varnish_node_update($node) { + varnish_purge_all_pages(); } - -