diff --git a/wp-includes/cache.php b/wp-includes/cache.php index 1ff448ab2e..babec4ffd6 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -91,6 +91,9 @@ class WP_Object_Cache { } function flush() { + if ( !$this->cache_enabled ) + return; + $this->rm($this->cache_dir.'*'); $this->cache = array (); $this->dirty_objects = array ();