Title: Use query string value for cache key
Last modified: April 15, 2025

---

# Use query string value for cache key

 *  Resolved [macsolve](https://wordpress.org/support/users/macsolve/)
 * (@macsolve)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/use-query-string-value-for-cache-key/)
 * Is there a way through a filter or other to add the value of specific query strings
   to the cache key for the page cache? I need to have pages cached separately based
   on this (currently using disk advanced).

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/use-query-string-value-for-cache-key/#post-18419971)
 * Hello [@macsolve](https://wordpress.org/support/users/macsolve/)
 * Thank you for reaching out and I am happy to help!
   Just to confirm, you want 
   for example to separatly cache the same page based on this? Meaning have the 
   same page cached depending on the cache key?
 * Thanks!
 *  Thread Starter [macsolve](https://wordpress.org/support/users/macsolve/)
 * (@macsolve)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/use-query-string-value-for-cache-key/#post-18420108)
 * Yes that is correct. Certain query parameter values affect the contents of the
   page, for example currency
 *  Thread Starter [macsolve](https://wordpress.org/support/users/macsolve/)
 * (@macsolve)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/use-query-string-value-for-cache-key/#post-18420111)
 * (duplicate comment)
    -  This reply was modified 1 year, 1 month ago by [macsolve](https://wordpress.org/support/users/macsolve/).
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/use-query-string-value-for-cache-key/#post-18420264)
 * Hello [@macsolve](https://wordpress.org/support/users/macsolve/)
 * Thank you for your feedback.
   You can add the specific query string in Performance
   >Page Cache>Advanced>Accepted query strigs with Disk EnhancedDo you have sppecific
   cookies set depending on the geolocation?
 * THanks!
 *  Thread Starter [macsolve](https://wordpress.org/support/users/macsolve/)
 * (@macsolve)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/use-query-string-value-for-cache-key/#post-18420467)
 * ”Accepted query strings” doesn’t help that case. They just enable the page cache
   even if one of those query parameters are present, but they don’t separate the
   cache for different parameter values, which is exactly what I want. The query
   parameters are just accepted but ignored.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/use-query-string-value-for-cache-key/#post-18422727)
 * Hello [@macsolve](https://wordpress.org/support/users/macsolve/)
 * Thank you for your feedback.
   The only way to use separate cache would be using
   Cookie groups and setting different cookies. You can enable this in Performance
   >Cache Groups. Once enabled you can Create a group of Cookies by specifying names
   in the Cookies field. Assign a set of Cookies to ensure that a unique cache is
   created for each Cookie group. Please note that Regex is also supported now.
 * Thanks!

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

The topic ‘Use query string value for cache key’ is closed to new replies.

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

## Tags

 * [page-cache](https://wordpress.org/support/topic-tag/page-cache/)
 * [Query String](https://wordpress.org/support/topic-tag/query-string/)

 * 6 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/use-query-string-value-for-cache-key/#post-18422727)
 * Status: resolved