Hi @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
(@will83)
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!