Title: [Plugin: W3 Total Cache] Object cache flushing
Last modified: August 19, 2016

---

# [Plugin: W3 Total Cache] Object cache flushing

 *  Resolved [Stephane Boisvert](https://wordpress.org/support/users/sboisvert/)
 * (@sboisvert)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-object-cache-flushing/)
 * 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(); }

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [jani-u](https://wordpress.org/support/users/jani-u/)
 * (@jani-u)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-object-cache-flushing/#post-1771521)
 * 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?
 *  Plugin Contributor [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-object-cache-flushing/#post-1771552)
 * [@jani-u](https://wordpress.org/support/users/jani-u/), what problems are you
   having specifically? The code that [@sboisvert](https://wordpress.org/support/users/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.
 *  [Jared Pomranky](https://wordpress.org/support/users/jareddetroit/)
 * (@jareddetroit)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-object-cache-flushing/#post-1771574)
 * Thank you for the function [@sboisvert](https://wordpress.org/support/users/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.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: W3 Total Cache] Object cache flushing’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [Jared Pomranky](https://wordpress.org/support/users/jareddetroit/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-object-cache-flushing/#post-1771574)
 * Status: resolved