Skip to content

Instantly share code, notes, and snippets.

@ttrowell
ttrowell / 00.php
Last active April 11, 2016 20:05
00.php
<?php
// Move the WP Native Sessions plugin to the mu-plugins directory and add this file:
require_once(dirname(__FILE__).'/wp-native-php-sessions/pantheon-sessions.php');
@ttrowell
ttrowell / per-page-bypass
Created June 29, 2016 16:07
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;
}