You are here

function _varnish_get_host in Varnish 7

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

Helper function to parse the host from the global $base_url.

3 calls to _varnish_get_host()
VarnishCache::clear in ./varnish.cache.inc
Expires data from the cache.
varnish_expire_cache in ./varnish.module
Implements 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 315
Common functions used for the module.

Code

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