I am attempting to set up a multilingual wordpress instance with cloudflare CDN in front.
The site is completely read-only and links to other service endpoints where users can interact with the company.
I would like to support caching the localized pages in cloudflare and redirecting visitors to different localized uris server-side by geo-location but I find I cannot in good conscience call the project done unless I have assurances that cloudflare does not cache “localization redirects” or if it does then the cache is partitioned in the CDN by geo location ( meaning geo country code is used in the CDN cache key ). Note a “localization redirect” is just a redirect due to us detecting they are at the default uri and need to go to a localized uri valid for their country.
Imagine if a client originating from France requested my non-french, not localized uri path and the cloudflare CDN had a redirect cached to the italian path due to previous activity of a client originating from Italy. This would not be good.
I also do not want to exclude the “default landing page” from being cached because it will have the default language content on it if no redirect is required. Meaning the server controls if the user receives a redirect or page content based on where they are in the world.
The way I see it I need to ensure server side redirects due to localization detection are not cached or ensure that the CDN when IP Geolocation is on keeps separate cache pools by Geolocation.
I am very new to cloudflare so I unfortunately have many unknowns here.
If anyone has an exceedingly strong argument against server-side Geo-based localization detection and redirects I would also appreciate your viewpoints.
I know cloudflare also has a “serverless” offering but I lack experience and knowledge to say it can be used here much less describe how.