Ticket #3726: kill_references_when_caching_objects.diff
File kill_references_when_caching_objects.diff, 826 bytes (added by , 14 years ago) |
---|
-
wp-includes/cache.php
1 1 <?php 2 2 function wp_cache_add($key, $data, $flag = '', $expire = 0) { 3 3 global $wp_object_cache; 4 $data = unserialize(serialize($data)); 4 5 5 6 return $wp_object_cache->add($key, $data, $flag, $expire); 6 7 } … … 37 38 38 39 function wp_cache_replace($key, $data, $flag = '', $expire = 0) { 39 40 global $wp_object_cache; 41 $data = unserialize(serialize($data)); 40 42 41 43 return $wp_object_cache->replace($key, $data, $flag, $expire); 42 44 } 43 45 44 46 function wp_cache_set($key, $data, $flag = '', $expire = 0) { 45 47 global $wp_object_cache; 48 $data = unserialize(serialize($data)); 46 49 47 50 return $wp_object_cache->set($key, $data, $flag, $expire); 48 51 }