Function to call to flush WP REST cache
-
Hi,
Is there a function that I can call through a script to clear the wp rest cache?Below is an example of what I’m doing with the script to call the function that clears WP Rocket’s cache for my site either through SSH or through an HTTPS call. I call this any time a commit is pushed via git to ensure that the latest changes from dev -> prod are working correctly and the cache isn’t serving outdated content. I’d like to make sure the same thing happens with my wp rest cache.
if ( function_exists( 'rocket_clean_domain' ) ) { rocket_clean_domain(); echo ( "Cache Flushed <br><br>" ); error_log( "Cache Flushed \n" ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Function to call to flush WP REST cache’ is closed to new replies.