sboisvert
Member
Posted 2 years ago #
I use this function to clear the object cache, maybe it could be of use to others.
function w3tc_objectcache_flush(){
require_once W3TC_DIR . '/lib/W3/ObjectCache.php';
$w3_objectcache = & W3_ObjectCache::instance();
return $w3_objectcache->flush();
}
I've had several problems with the object cache. If I want to test this, where should I add it and where to call it from?
@jani-u, what problems are you having specifically? The code that @sboisvert is intended to allow for purging the object cache in a theme/plugin, but if you're having issues with object caching, the first step is to determine where the conflict is specifically instead of purging the cache frequently.
JaredDetroit
Member
Posted 2 years ago #
Thank you for the function @sboisvert! This is very useful. Now I can include it in my plugins and themes to make it easier to use for my end users and clients, all of which I setup with W3 Total Cache.
It works very well.