W3 total cache – cache refresh programmatically [closed]

I am building a Digg like website in WordPress.

After installing W3 Total Cache, I noticed certain elements such as number of votes (and voters ids) per post are cached even though they shouldn’t be (at least not after a user votes for an article).
I assume it is not possible to prevent specific elements in a page from being cached (or is it?), so I thought of triggering page cache refresh programmatically.

Any suggestions?

6

if you want to flush the cache you can do that:
the plugin has functions for that

<?php 

flush_pgcache()  //page cache
flush_dbcache()  // database cache
flush_minify()  // minify cache
flush_all() //all caches

?>

and you just need to call it like this:

<?php 
 $w3_plugin_totalcache->flush_all();
?>

and that is basically the answer to the question in the title
“cache refresh programmatically”

Leave a Comment