Created
January 11, 2018 18:20
-
-
Save chasecmiller/21fb0863e3da17358542dda6c90421bb to your computer and use it in GitHub Desktop.
WPEngine - Cache key override - You need this if you want to run a secondary ( or multisite ) in a subdirectory on WP Engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Author: Chase C. Miller | |
* Working Date: 2017-01-11 | |
* Custom cache key for WPEngine to bypass object caching problems that can happen when you install a secondary or multisite on WPEngine. | |
* It should be installed as a mu-plugin to catch early activation. | |
**/ | |
global $wp_object_cache; | |
if ($wp_object_cache && get_class($wp_object_cache) == 'WP_Object_Cache') { | |
// Change a-unique-key to a unique identifier for your site. | |
$wp_object_cache->customer = 'a-unique-key'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment