Vary Cache based on Country




Wordpress LScache Plugin: Vary Cache based on Country

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi, I am trying to vary the LSCache based on the country code, as set in the incoming HTTP header request by CloudFlare. I have this at the bottom of my .htaccess: # Vary cache by region RewriteCond % HTTP:Cf-Ipcountry (. ) RewriteRule . - [E=Cache-Control:vary=% ENV:LSCACHE_VARY_VALUE +%1] But it does not seem to work. Any ideas on how to get this working? This topic was modified 9 months, 1 week ago by ivantrendafilov. Hi, try put it on top of everything Best regards,



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference