Hey, I got a solution that worked for me. In order to do that you have to modify a couple of files.
First, open your config file (wp-config.php), and a line like this;
define ('DISABLE_CACHE', '1');
It has to be before the require_once
call!
Generally, this would turn the cache off. However, there are two small bugs that prevent this feature for working. In order to fix them, open your wp-includes/cache.php
file. Find the wp_cache_replace
and the wp_cache_set
functions. Those are the ones that cause the trouble, and that’s because of the serialize|unserialize calls. We have disabled the caching, but nevertheless those functions are not aware of it, because the serialize|unserialize calls are executed before it. So, here’s the patch: add the following line:
function wp_cache_set($key, $data, $flag = '', $expire = 0) {
if (defined('DISABLE_CACHE'))
return;
if ( ! defined('ENABLE_CACHE') )
return;
global $wp_object_cache;
$data = unserialize(serialize($data));
return $wp_object_cache->set($key, $data, $flag, $expire);
}
That’s it. Remember to do this to both functions wp_cache_replace
and the wp_cache_set