W3 Total Cache
[resolved] Object cache flushing (4 posts)

  1. sboisvert
    Posted 5 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();

  2. jani-u
    Posted 5 years ago #

    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?

  3. Frederick Townes
    Plugin Author

    Posted 5 years ago #

    @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.

  4. JaredDetroit
    Posted 5 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic