And where would we find the source code repository? Is it this here: https://github.com/RedCastor/wp-rest-cache?
Hi @nilsnolde
Thank you for using our plugin!
At this point we do not have an option to ignore specific query string parameters. However you use case makes it totally understandable to want to have that option, so we will add a filter for it. I will let you know once we have implemented and released it.
About the source code repository: At the moment it is not publicly accessible (it is in a private Bitbucket repository), but we are considering making it public. The repository you found is from someone who created his own repository containing the code of our plugin. However it is very outdated, so I don’t recommend using it.
Great, thanks so much @rockfire for considering add this to the plugin.
I’d highly recommend to put it on Github, I would have put an issue and asked if I can PR it in. Apart from Github’s respectable SEO, WordPress’ GPL etc.
At this point we do not have an option to ignore specific query string parameters.
And maybe I’m misunderstanding this, but is there an option then to ignore all query string params, not just specific ones?
Let me know if/when you made the repo public, my offer still stands:)
Hi @nilsnolde
We just release a new version of our plugin which includes a filter to ignore specific query string parameters. If you would for instance have a parameter wprc_param in your query string you would like to have ignore, you can do so like this:
/**
* Do not use the 'wprc_param' query parameter in the cacheable query string.
*/
function wprc_set_uncached_parameters( $uncached_parameters ) {
$uncached_parameters[] = 'wprc_param';
return $uncached_parameters;
}
add_filter( 'wp_rest_cache/uncached_parameters', 'wprc_set_uncached_parameters', 10, 1 );
Please let us know if this works for you!
And no, there isn’t an option to ignore all query parameters.
Sorry for the late reply, just got around looking at this again.
And great news @rockfire : it works as advertised!! Thanks so much for the quick turnaround! Always happy to see dedicated plugin maintainers, unfortunately not that common in the WP world.