Title: how to replace wp_cache_request_uri?
Last modified: October 7, 2019

---

# how to replace wp_cache_request_uri?

 *  [tsuchim](https://wordpress.org/support/users/tsuchim/)
 * (@tsuchim)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/how-to-replace-wp_cache_request_uri/)
 * The WP Super Cache is very great cache plugin.
 * I would like it to ignore some parameters for caching, ex. ?gclid=xxxxx.
    The
   best solution for me is that the “WP Super Cache” would add configuration “Ignore
   Parameters” in preference, but it is somehow difficult.
 * The next solution is to hack $wp_cache_request_uri using a plugin for the super
   cache.
    Would you want to tell me how to replace wp_cache_request_uri by a plugin,
   or something better solutions?
 * Actually, I add a below line directly after every updating the super cache in
   wp-cache-phase1.php:
    $wp_cache_request_uri = preg_replace(‘/\?gclid=.+$/’,”,
   $wp_cache_request_uri);

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

 *  [dvazquez260376](https://wordpress.org/support/users/dvazquez260376/)
 * (@dvazquez260376)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/how-to-replace-wp_cache_request_uri/#post-12030190)
 * + 1 to this request.
 * I would also like to have the possibility to ignore some parameters (gclid, fbclid,..).
 * Links coming from Facebook or Google ads are not cached because this parameters
   never have the same values.
 *  Thread Starter [tsuchim](https://wordpress.org/support/users/tsuchim/)
 * (@tsuchim)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/how-to-replace-wp_cache_request_uri/#post-12063218)
 * Exactly, and these pages especially need speed.
    We need something to treat the
   pages with these parameters.
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/how-to-replace-wp_cache_request_uri/#post-12138391)
 * There’s a setting “Don’t cache pages with GET parameters” which will do what 
   you want, in a general way.
 *  Thread Starter [tsuchim](https://wordpress.org/support/users/tsuchim/)
 * (@tsuchim)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/how-to-replace-wp_cache_request_uri/#post-12506581)
 * Thank you for your reply.
    However, we want to remove only these parameters and
   use the others.
 *  Thread Starter [tsuchim](https://wordpress.org/support/users/tsuchim/)
 * (@tsuchim)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/how-to-replace-wp_cache_request_uri/#post-12506797)
 * I am sorry, but I am confused with what the “Don’t cache pages with GET parameters”
   option means, whether caching is disabled for pages with GET parameters or enabled
   for pages that ignore GET parameters.

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

The topic ‘how to replace wp_cache_request_uri?’ is closed to new replies.

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

 * 5 replies
 * 2 participants
 * Last reply from: [tsuchim](https://wordpress.org/support/users/tsuchim/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/how-to-replace-wp_cache_request_uri/#post-12506797)
 * Status: not resolved