I noticed that Litespeed cache is serving cached version of the pages that were crawled in the main currency (USD), but not in the secondary currency (CAD). We have set the wcml_client_currency cookie in the settings to capture both currencies. How can we make sure that the crawler is working for all currencies and the user is served the correct cached page? Thanks
I've sent all the details from your ticket to our development team. I will get back to you likely later today, with their feedback. Thank you for your patience.
The currency is set via client location. This will backfire and cause issues as there is the visitor from his own server.
It turns out the issue is related to how the site sets the currency based on client location. In this case, using the wcml_client_currency cookie alone isn’t enough, because WCML applies internal checks tied to the visitor’s actual geolocation (when logged out), or shipping address (when logged in).
That means the crawler, running from the server’s location, can’t always trigger the correct currency-specific cache. To confirm this, you can temporarily allow all currencies to be accessible from any location and test whether the correct cached version is then served.
And correctly received the page with the CAD currency.
It also works fine for the page hidden link (we can see the currency in the header). Check attached image.
Please answer these 2 questions:
1. What does he expect to see on the "Floater Frames in Cary"? (the "50$" is a content string or is a dynamic variable?)
2. Why don't we see the top bar menu with the currency switcher on his screenshot?
The page I included as an example was just an example. There is nothing wrong with how this page is showing on the frontend. The currency switched wasn't showing because the screenshot was taken on mobile view.
The issue discussed in this ticket is only related to caching and the LS crawler.
As you can see on the attached image here, all the pages were successfully crawled. The cached pages are served correctly for the main currency (USD) on the frontend. But the secondary currency pages (CAD), are shown the uncached pages (except the ones that are manually loaded by an user). How to test:
- Use a VPN and browse from Canada.
- Go to this page: hidden link
- Load random links from this page and see if you are getting cache Hits or Miss.