I’m using WooCommerce Multilingual & Multicurrency with WPML and LiteSpeed Cache on a high-traffic WooCommerce store.
My setup is:
each language is served from a separate domain,
each language/domain has exactly one assigned currency,
there is no currency switcher on the site,
users cannot manually change the currency,
currencies are displayed based on the site language.
So the architecture is effectively:
Language A / Domain A → Currency A only
Language B / Domain B → Currency B only
Language C / Domain C → Currency C only
However, WCML appears to set this cookie for anonymous users:
_lscache_vary=wcml_currency:XXX
LiteSpeed then uses this _lscache_vary cookie as part of the cache key. As a result, the first anonymous request without the cookie is always a cache MISS. Only the second request from the same client, after the cookie has been set, becomes a cache HIT.
We confirmed this with curl using a cookie jar.
First request:
set-cookie: _lscache_vary=wcml_currency%3AXXX
x-litespeed-cache: miss
Second request with the same cookie jar:
x-litespeed-cache: hit
This is important for us because the store receives very high traffic, and first-request cache misses for anonymous users have a significant performance and server-load impact.
My question:
In a setup where each language/domain has only one fixed currency and there is no currency switcher, is this _lscache_vary=wcml_currency:... cookie still required?
If it is not required, is there an official WPML/WCML-supported way to disable this cookie or prevent WCML from adding the currency vary cookie for this specific single-currency-per-language/domain setup?
I would prefer not to use a custom workaround that removes Set-Cookie headers manually. I’m looking for the safest official approach, ideally a WCML setting or filter.
For context, I have already checked LiteSpeed Cache settings and there are no manually configured vary cookies:
cache-vary_cookies: not set
cache-no_cache_cookies: not set
So the cookie seems to be generated by WCML or the WCML/LiteSpeed compatibility layer.
Could you please advise what the recommended solution is for this architecture, especially for a high-traffic store where anonymous first-request cache misses matter?
Thank you for contacting WPML support. I'd be happy to assist you on this issue.
To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.
So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply. hidden link