mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Introduce wp_suspend_cache_addition() to allow reduced memory usage when cache additions aren't useful. Fixes #5389.
git-svn-id: https://develop.svn.wordpress.org/trunk@18681 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -294,6 +294,9 @@ class WP_Object_Cache {
|
||||
* @return bool False if cache key and group already exist, true on success
|
||||
*/
|
||||
function add( $key, $data, $group = 'default', $expire = '' ) {
|
||||
if ( wp_suspend_cache_addition() )
|
||||
return false;
|
||||
|
||||
if ( empty ($group) )
|
||||
$group = 'default';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user