Title: Query param for flushing cache
Last modified: October 1, 2021

---

# Query param for flushing cache

 *  [will83](https://wordpress.org/support/users/will83/)
 * (@will83)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/query-param-for-flushing-cache/)
 * There is a query param to bypass the cache (?skip_cache=1), but when I remove
   this param, the return is the previous cached version.
    Is there a param to flush
   the cache for a specific endpoint via url (like ?flush_cache=1) ?
 * Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/query-param-for-flushing-cache/#post-14947600)
 * Hi [@will83](https://wordpress.org/support/users/will83/)
 * Thank you for using our plugin!
 * No there isn’t such a parameter and with good reason: with such a parameter someone
   else could potentially flush your caches without you knowing about it.
 * Could you explain your use case? Why would you want to flush your caches through
   a query param? Maybe we can implement a solution that works for you.
 *  Thread Starter [will83](https://wordpress.org/support/users/will83/)
 * (@will83)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/query-param-for-flushing-cache/#post-14947745)
 * I use your plugin for requests that come from a website in Next.js (I use WordPress
   as a headless CMS).
    Especially in the development phase, it’s annoying for the
   front end developer to have to flush the cache from the WordPress admin (sometimes
   they don’t even have access to it). I imagine it could have other uses in production.
   I understand that it can be annoying that someone invalidates the cache without
   my permission. To overcome this, the parameter could have the value of a token
   defined by the backend developer (like ?flush_cache=WP_REST_CACHE_FLUSH_TOKEN,
   possibly correlated with the existence of a WP_REST_CACHE_FLUSH_TOKEN constant
   defined in wp-config.php).
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Query param for flushing cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-rest-cache/assets/icon-256x256.png?rev=3328849)
 * [WP REST Cache](https://wordpress.org/plugins/wp-rest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-rest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-rest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-rest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-rest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-rest-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [will83](https://wordpress.org/support/users/will83/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/query-param-for-flushing-cache/#post-14947745)
 * Status: not resolved