Thanks for the suggestions, we are going to develop our own solution with the whole pricing done client-side and using some ajax requests, think this is closest to your suggestion number 3. This way we will only need 1 cached variant per page and allows us to still deliver speedy variable content based on the consumers location / preferences.
Hi @sebastiaanvaz’ developer here.
We have the country code available through cloudflare’s proxy headers. we cannot rely on cookies, since they wont exist on first visit (and currency cookie will only exist if the user changes currency).
We currently use a Cache vary rule in the htaccess file:
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E="cache-vary:wcml_currency"]
</IfModule>
But this will only work if the cookie is present, if not the page will be cached (upon first visit of the page) based on the geo location of the user and the available currencies for that location. all other visitors will get to see this exact same page.