mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Disable peristent cache when safe_mode.
git-svn-id: https://develop.svn.wordpress.org/trunk@3436 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -396,6 +396,10 @@ class WP_Object_Cache {
|
||||
if (defined('DISABLE_CACHE'))
|
||||
return;
|
||||
|
||||
// Disable the persistent cache if safe_mode is on.
|
||||
if ( ini_get('safe_mode') )
|
||||
return;
|
||||
|
||||
if (defined('CACHE_PATH'))
|
||||
$this->cache_dir = CACHE_PATH;
|
||||
else
|
||||
@@ -403,10 +407,11 @@ class WP_Object_Cache {
|
||||
|
||||
if (is_writable($this->cache_dir) && is_dir($this->cache_dir)) {
|
||||
$this->cache_enabled = true;
|
||||
} else
|
||||
} else {
|
||||
if (is_writable(ABSPATH.'wp-content')) {
|
||||
$this->cache_enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (defined('CACHE_EXPIRATION_TIME'))
|
||||
$this->expiration_time = CACHE_EXPIRATION_TIME;
|
||||
|
||||
Reference in New Issue
Block a user