You are here

function varnish_purge_all_pages in Varnish 5

Same name and namespace in other branches
  1. 8 varnish.module \varnish_purge_all_pages()
  2. 6 varnish.module \varnish_purge_all_pages()
  3. 7 varnish.module \varnish_purge_all_pages()

Helper function to quickly flush all caches for the current site.

4 calls to varnish_purge_all_pages()
varnish_comment in ./varnish.module
Implementation of hook_comment()
varnish_cron in ./varnish.module
Implementation of hook_cron
varnish_flush_cache_manually in ./varnish.module
Implementation of hook_flush_caches()
varnish_nodeapi in ./varnish.module
Implementation of hook_nodeapi()

File

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

Code

function varnish_purge_all_pages() {
  $path = base_path();
  $host = _varnish_get_host();
  _varnish_terminal_run("purge req.http.host ~ {$host} && req.url ~ ^{$path}");
}