Title: cache query string
Last modified: September 14, 2024

---

# cache query string

 *  Resolved [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/)
 * Hi Support
 * I am using this plugin called CURCY that allows my shop to switch currency using
   javascript. The product’s URL remains the same regardless which currency I use.
   Under Chrome inspection, I can see the product is showing a “Hit” status for 
   page cache, when I switch to another currency, it is showing as “missing”?
 * The URL is the same, so why is the latter not cached?
 * Here is a sample product:
 * [https://www.marsnvenus.com/shop/sample-product-a-copy/](https://www.marsnvenus.com/shop/sample-product-a-copy/)

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/topic/cache-query-string-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cache-query-string-2/page/2/?output_format=md)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014826)
 * because it needs to be this way , otherwise you will see the currency remains
   unchanged
 * like your default is USD , when you change to other like EUR or GBP or something,
   if it still get cache , you will still see USD instead of selected currency
 * so it sets a cookie to determine the currency and vary on the cache
 * by that saying , same URI , if cookie value is XXX , then it serve one cache ,
   if cookie value is YYY then it serve another different cache , if cookie is ZZZ,
   then another cache.
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014873)
 * thank you for writing back.
 * It looks like the crawler is only cache the default currency. Is there any way
   for the crawler to cache other currencies with those cookies?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014874)
 * crawler has a feature called cookie simulation for this
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014884)
 * this setting is very new to me, can you point me what I should enter under this
   field?
 * cookie names are as follows:
 * wmc_current_currency
 * wmc_current_currency_old
 * and on the box to the right, I enter USD, EUR, GBP, one on each line?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014885)
 * `wmc_current_currency` should be enough , and yes , enter each currency by line,
   and also an empty value for default currency
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014889)
 * sorry, but how do I leave an empty value for default currency?
 * ((leave a blank))
 * EUR
 * GBP
 * like this in three lines?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014890)
 * ![](https://i0.wp.com/i.imgur.com/kIN49bf.png?ssl=1)
 * like this
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014897)
 * thank you once again. I digged a little deeper and notice theres a thread created
   by another person on litespeed cache plugin.
 * Do I need to add these code? ([https://wordpress.org/support/topic/currency-converter-working-with-litespeed-cache-google-feed-etc/page/2/](https://wordpress.org/support/topic/currency-converter-working-with-litespeed-cache-google-feed-etc/page/2/))
 *     ```wp-block-code
       RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = USD [NC]
       RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+usd
   
       RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = GBP [NC]
       RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+gbp
   
       RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = THB [NC]
       RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+thb
   
       RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = EUR [NC]
       RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+eur
   
       RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = AUD [NC]
       RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+aud
   
       RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = CAD [NC]
       RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+cad
   
       RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = MXN [NC]
       RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+mxn
   
       RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = NZD [NC]
       RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+nzd
       ```
   
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014900)
 * if it is working without it , then no need to add it
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18014912)
 * After adding those cookies, i notice that only the default currency is cached
   under chrom delveoper tools.
 * When I switch currency and press F5, theres no cache header.
 * Here’s a sample page:
 * [https://www.mylovehoney.com/shop/plain-color-cable-knit-sleeveless-cardigan-vest/](https://www.mylovehoney.com/shop/plain-color-cable-knit-sleeveless-cardigan-vest/)
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18015256)
 *     ```wp-block-code
       May I ask where in htacess do I add this code to:RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = USD [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+usd]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = GBP [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+gbp]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = THB [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+thb]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = EUR [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+eur]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = AUD [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+aud]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = CAD [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+cad]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = MXN [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+mxn]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = NZD [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+nzd]
       ```
   
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18015641)
 * thank you for the reply.
 * my site also uses query string so customers are quickly identified to use which
   currency when they land on the product page. it is how google shopping feed is
   set up. How do I get the crawler to crawl an url with query string
 * [http://www.abc.com/productA/?wmc-currency=AUD](http://www.abc.com/productA/?wmc-currency=AUD)
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18015646)
 *     ```wp-block-code
       Just want to confirm if this is the right way to insert the code:RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = USD [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+usd]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = GBP [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+gbp]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = AUD [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+aud]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = CAD [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+cad]RewriteCond %{HTTP_COOKIE} ^wmc_current_currency$ = NZD [NC]RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+nzd] BEGIN LSCACHE LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block!RewriteEngine onCacheLookup onRewriteRule .* - [E=Cache-Control:no-autoflush]RewriteRule litespeed/debug/.*.log$ - [F,L]RewriteRule .litespeed_conf.dat - [F,L] marker ASYNC startRewriteCond %{REQUEST_URI} /wp-admin/admin-ajax.phpRewriteCond %{QUERY_STRING} action=async_litespeedRewriteRule .* - [E=noabort:1] marker ASYNC end marker CACHE RESOURCE startRewriteRule wp-content/./[^/](responsive|css|js|dynamic|loader|fonts).php - [E=cache-control:max-age=3600] marker CACHE RESOURCE end marker LOGIN COOKIE startRewriteRule .? - [E="Cache-Vary:,wp-postpass_2cdc91481948393ac7cf30292d6e21d2,wmc_current_currency,wmc_current_currency_old,wmc_ip_info"] marker LOGIN COOKIE end marker DROPQS startCacheKeyModify -qs:fbclidCacheKeyModify -qs:gclidCacheKeyModify -qs:utm*CacheKeyModify -qs:_gaCacheKeyModify -qs:attribute_pa_sizeCacheKeyModify -qs:attribute_pa_color marker DROPQS end LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! END LSCACHE BEGIN NON_LSCACHE LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! marker BROWSER CACHE startExpiresActive onExpiresByType application/pdf A3888000ExpiresByType image/x-icon A3888000ExpiresByType image/vnd.microsoft.icon A3888000ExpiresByType image/svg+xml A3888000ExpiresByType image/jpg A3888000ExpiresByType image/jpeg A3888000ExpiresByType image/png A3888000ExpiresByType image/gif A3888000ExpiresByType image/webp A3888000ExpiresByType video/ogg A3888000ExpiresByType audio/ogg A3888000ExpiresByType video/mp4 A3888000ExpiresByType video/webm A3888000ExpiresByType text/css A3888000ExpiresByType text/javascript A3888000ExpiresByType application/javascript A3888000ExpiresByType application/x-javascript A3888000ExpiresByType application/x-font-ttf A3888000ExpiresByType application/x-font-woff A3888000ExpiresByType application/font-woff A3888000ExpiresByType application/font-woff2 A3888000ExpiresByType application/vnd.ms-fontobject A3888000ExpiresByType font/ttf A3888000ExpiresByType font/otf A3888000ExpiresByType font/woff A3888000ExpiresByType font/woff2 A3888000 marker BROWSER CACHE end LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! END NON_LSCACHE
       ```
   
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/#post-18015649)
 * the code broke my site and causes a 404 error
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/page/2/#post-18015737)
 * I guess its fine now, I move the code right after end of wordpress. I will see
   if cache is working after crawling is complete.

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/topic/cache-query-string-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cache-query-string-2/page/2/?output_format=md)

The topic ‘cache query string’ is closed to new replies.

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

 * 24 replies
 * 3 participants
 * Last reply from: [raymond621](https://wordpress.org/support/users/raymond621/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/cache-query-string-2/page/2/#post-18017281)
 * Status: resolved