Cache plugins
How to make YayCurrency work with WordPress cache plugins
In YayCurrency (version 2.4.2 and newer) → go to Advanced Settings, you can enable Compatible with cache plugins to make it work with your caching system.
Enable this option will do these actions:
Bypass server cache
Fetch the latest currency data using AJAX
Save the newest data into the browser cookie

Why Does Cache Break Currency Display?
Full-page cache works by storing a static HTML snapshot and serving it to all users, helping the website load faster. However, this is exactly what causes issues with multi-currency.
Currency is dynamic data that varies per visitor, while cache stores a static HTML version.
Factors that influence currency display:
User cookie
Geolocation
Language
Previously selected currency
Similar to other multi-currency plugins, the caching system needs a special mechanism to ensure the correct currency is displayed for each visitor.
Compatible with Cache Plugins
This feature allows YayCurrency to function correctly even when the website is using aggressive caching. Rather than requiring the entire website to be "uncached", YayCurrency uses a combination of:
Client-side refresh
REST API hydration
Dynamic currency rendering
This allows the website to still leverage cache for speed, while currency remains accurate for each individual visitor.
YayCurrency is compatible with:
Server cache
Reverse proxy cache
Full-page cache
CDN cache
Because currency is refreshed after page load via the REST API.
What Is Object Cache?
Object cache is a type of cache that stores the results of database queries or PHP data in memory (RAM), typically using Redis or Memcached, rather than caching the entire HTML output like a full-page cache does.
Because YayCurrency handles currency rendering at the client-side layer, server-level object cache does not affect the currency display result for each visitor. Therefore, YayCurrency remains fully stable when object cache is in use.
Tested Compatible Cache Plugins & Server Cache Solutions
YayCurrency has been tested and confirmed to work reliably with the following popular caching solutions:
LiteSpeed Cache
WP Rocket
W3 Total Cache
NitroPack
WP Super Cache
SG Optimizer
WP-Optimize
Cloudflare Cache
Server Cache / CDN Cache / Object Cache (general)
And many others
Cloudflare APO: Is It Compatible?
Yes. YayCurrency is compatible with Cloudflare APO because all currency update logic takes place after the page has loaded, and no uncached HTML is required.
Important Note: When Using Cloudflare APO
Cloudflare APO must not cache YayCurrency's API responses. If these requests are cached, the currency data returned will no longer be accurate for each visitor.
A cache bypass rule must be created for the following endpoint:
How to create the rule in Cloudflare:
Go to Cloudflare Dashboard → Caching Rules → Create Rule → Set the condition: URI Path contains /wp-json/yaycurrency/v1/caching/ → Set action: Bypass Cache.
Last updated
Was this helpful?