You are here

function authcache_backend_check_vary in Authenticated User Page Caching (Authcache) 7.2

Return true if the vary header is suitable for the active cache backend.

Related topics

2 calls to authcache_backend_check_vary()
authcache_authcache_cancel in ./authcache.module
Implements hook_authcache_cancel().
authcache_backend_init in ./authcache.cache.inc
Initialize the cache backend module.

File

./authcache.cache.inc, line 244
Defines authcache aware copy of drupal_serve_page_from_cache().

Code

function authcache_backend_check_vary($set_vary_header = NULL) {
  $vary_header =& drupal_static(__FUNCTION__);
  if (isset($set_vary_header)) {
    $vary_header = $set_vary_header;
  }
  $hook_boot_headers = drupal_get_http_header();
  if (isset($hook_boot_headers['vary']) && $hook_boot_headers['vary'] !== $vary_header) {
    return FALSE;
  }
  else {
    return TRUE;
  }
}