Use the rocket_clean_files() function when you want to purge some specific pages of the cache.

You can use a string, or an array with the URL(s) to purge.

// clean
rocket_clean_files( '' );

// clean and
$clear_urls = array(
rocket_clean_files( $clear_urls );

Passing a URL to this function will clear the cache from that URL recursively. This means that if you pass a URL, both the exact URL and everything within the URL path will be cleaned, so, passing this: "" will cause everything inside /blog/(.*) to be cleared too, you don't have to use a wildcard for it.

It is important to note this function only accepts full URLs, for example: https://mydomain/some-page/ instead of just /some-page/.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.