WPLocation

Country-aware content for WordPress

  • Features
  • Demo
  • Add-ons
  • Pricing
  • Blog
  • Account
  • Get WPLocation
← All documentation/Page cache and CDN safety
Free + Pro

Page cache and CDN safety

For the current website releases: Free 1.1.4 and Pro 1.4.0.

On this page
  1. Object cache versus page cache
  2. Choose a safe cache strategy
  3. A practical test matrix
  4. If a page looks wrong
Free setupPro & licensingMy account & downloads

Country rules are evaluated by WordPress when a request reaches it. A full-page cache or CDN can return saved HTML before WordPress runs. That can show one country’s content to another country or keep showing a page after its rule changes. Treat caching as part of every country-rule launch.

Object cache versus page cache

An object cache such as Redis keeps reusable WordPress data between requests. WordPress still renders each response, so WPLocation can evaluate the current visitor’s country. It may reduce repeated database work, but it does not cache the finished page or guarantee a particular load time. The WPLocation store uses an isolated Redis object cache for this reason.

Checkout, purchase confirmation and customer account pages must remain outside any shared full-page cache. The same is true of pages with country-specific rules unless the cache is proven to vary by the right visitor signal. For Easy Digital Downloads carts, account sessions and purchase links, include the platform’s documented page and cookie exclusions if you add a separate HTML cache.

Choose a safe cache strategy

  1. Identify every cache layer: hosting page cache, WordPress cache plugin, reverse proxy and CDN. Browser cache is a separate layer.
  2. Exclude targeted URLs from shared full-page cache unless the layer demonstrably varies entries by a trusted country signal. Do not assume a “geolocation compatible” marketing label proves the current rule works.
  3. Test at the public edge: check an allowed and denied location on the exact URL, including the second request after a cache entry exists.
  4. Purge after changes: rule edits, data-source changes and plugin updates can leave old HTML in cache.

Free asks WordPress not to cache targeted output and purges WP Super Cache when its API is available. Those steps cannot control every host or CDN. WPLocation does not currently provide a universal AJAX rendering mode or country-specific cache-key integration. Configure your own cache stack deliberately.

A practical test matrix

Request Expected check
Allowed country, first visit Targeted content appears.
Denied country, after first visit The response is still restricted; it is not the cached allowed page.
Allowed country, after denied visit Content remains available; a blocked response has not contaminated the cache.
Unknown country Actively restricted content stays hidden.

For Pro stores, repeat the checks for catalog, direct product URL, cart and checkout. A cached catalog card is only one part of the flow. See WooCommerce testing.

If a page looks wrong

Bypass and purge each cache layer one at a time. Check the active rule, the local database and the address seen by the origin using Diagnostics. A VPN may also be affected by a previous browser or edge cache entry. Never rely on country rules to secure private files or confidential content.

Where to next?

Choose the right country rule →Check your cache and CDN →Browse all guides →
Need help with this guide?

Contact WPLocation with your software versions and the result you expected. Keep keys and customer data private.

Company

  • About us
  • Contact
  • Terms & Conditions
  • Privacy Policy

Product

  • Features
  • WPLocation Pro
  • Pricing
  • Add-ons roadmap
  • Get WPLocation

Resources

  • Blog
  • Documentation
  • Installation
  • Shortcodes
  • Changelog

Account & Support

  • My Account & Licenses
  • Contact Support
  • Blocked-content behavior

Copyright © 2026. WPLocation is a project of TechAbout LLC.
Questions? [email protected]