Our Wordpress website has a list of products which is generated on the server side. Depending on user ip (country) the list gets populated with different items. Some products are meant to be displayed for Spain and some other for Finland for example.

When we tried a CDN and html caching, sometimes users got the wrong products because the list is generated dynamically on the server side depending on country. In retrospect it seems like an obvious risk.

One way of solving this is to generate the list client side, but that will probably hurt our SEO too much. Any ideas how to approach this and combine geo specific html with CDN and html caching?