Tagged: Purge Cache, W3 Total Cache
- AuthorPosts
- March 19, 2021 at 8:45 am #35162Celine celineGuest
Hi,
I would wish to know if ther eis a W3TC function that can be called to flush the cache programatically. Let’s say that I have a website for a home holiday with an availabilty calendar. I wish tu run a function that flush the W3TC each time I receive a new reservation (so accurate availability is displayed to my visitors). I have a filter to run some code whenever a new reservation is received. So looking for the W3TC function that I can execute to flush the cache.
Thank you!
Best regards
March 19, 2021 at 8:58 am #35169Marko VasiljevicKeymasterHello Celine,
Thank you for your inquiry and I am happy to assist you with this.
You can usew3tc_flush_all
You can check more functions inwp-content/plugins/w3-total-cache/w3-total-cache-api.php
In this case the function:/** * Purges/Flushes everything */ function w3tc_flush_all( $extras = null ) { $o = \W3TC\Dispatcher::component( 'CacheFlush' ); $o->flush_all( $extras );
Thanks!
- AuthorPosts
- The topic ‘How to Flush W3TC Programatically?’ is closed to new replies.