Skip to content

Instantly share code, notes, and snippets.

@ttrowell
Created June 29, 2016 16:07
Show Gist options
  • Save ttrowell/6c16d66bcb0e63fdd7cd129f0935b3b3 to your computer and use it in GitHub Desktop.
Save ttrowell/6c16d66bcb0e63fdd7cd129f0935b3b3 to your computer and use it in GitHub Desktop.
Bypass Varnish and Drupal
// Set or replace $regex_path_match accordingly.
if ((preg_match($regex_path_match, $_SERVER['REQUEST_URI'])) {
drupal_page_is_cacheable(FALSE); //<--- Bypass Drupal too
$conf['page_cache_maximum_age'] = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment