You are here

function _varnish_get_host in Varnish 6

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

Help[er function to parse the host from the global $base_url

2 calls to _varnish_get_host()
varnish_expire_cache in ./varnish.module
Implementation of hook_expire_cache
varnish_purge_all_pages in ./varnish.module
Helper function to quickly flush all caches for the current site.

File

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

Code

function _varnish_get_host() {
  global $base_url;
  $parts = parse_url($base_url);
  return $parts['host'];
}