IP Geolocation and caching

Don’t know if this belongs here, but I didn’t find a Cache specific section.

I enabled the “IP Geolocation” feature, it works, I’m getting the country code and all. But, the caching seems to not being keyed on its value, so if I enable something only in some countries, the feature will be randomly active based on the location of first user that accessed a page. I had the Tiered cache feature active that, I think, made the matter worse. By disabling it seems to be working, but I don’t have a complete understanding of the interaction of those features.

Can someone explain the interaction of the IP Geolocation with the standard and the tiered caching?


You’re right, they aren’t. Cloudflare cache uses URL as the main cache key by default. You can set some Cache Keys with a Cache Rule, but the the use of headers — which you’d need to cache based on the geolocation header — as cache keys is only available to Enterprise Plan users.

Tiered Cache is unrelated to the logic of what is cached and why. It only makes Cloudflare fetch cached resources from another datacenter instead of from the origin, whenever possible.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.