Clear cache when a post is submitted [closed]

Hm, I am not sure but I think that whole cache should be invalidated on publishing of new post… Had you tried to enable debug info in W3TC and check why are those pages aren’t refreshed?

As for manual cache clear, from plugin’s FAQ:

How can I flush the cache without
using the WP Admin interface?

It’s possible to empty the entire
cache or simply purge the cache of a
single post / page:

Purge the entire
page cache:
if
(function_exists('w3tc_pgcache_flush'))
{ w3tc_pgcache_flush(); }

Purge a
single post / page by passing it’s ID:

if
(function_exists('w3tc_pgcache_flush_post'))
{ w3tc_pgcache_flush_post($post_id);
}

Leave a Comment