I know it is possible to programatically clear the cache for a single page/post by using w3tc_pgcache_flush_post($post_id). But how do I do it for a category, tag or a custom taxonomy?
Please help
I know it is possible to programatically clear the cache for a single page/post by using w3tc_pgcache_flush_post($post_id). But how do I do it for a category, tag or a custom taxonomy?
Please help
My temporary solution is to add this code into the flush_post function within PgCacheFlush.php
w3_rmdir($cache->_cache_dir . '/gratis');
I really wish that there were some kind of filter that I could use instead. Maby something for a future version?
I just updated to 3.5.1 and my solution (above) now gives an error. What could be wrong?
It seems as _cache_dir is no longer available, so I had to hard code the path.
w3_rmdir('/www/domain.com/public_html/wp-content/cache/page_enhanced/www.domain.com/gratis');
If anyone has a better idea of how to delete a custom file/directory, please let me know.
You must log in to post.