Cache Not Updating Immediately for PDF/Text Changes
I’m managing an Islamic educational website: https://suraahyaseenpdf.com
.
We frequently update PDFs and text content on the site. However, whenever I make changes, users continue to see the old content for several hours unless I manually purge the cache from both Cloudflare and Cloudways. Even after purging, some users report seeing outdated pages.
Currently, our setup includes:
Cloudways server
Breeze cache plugin
Varnish enabled
Cloudflare CDN
I’d like guidance on the best cache settings or workflow to ensure that updates (especially PDF files or page content) appear instantly for users, without needing manual cache purges every time.
Specifically, any advice on:
Cloudways Breeze settings for dynamic content updates.
Varnish caching configuration for frequently updated pages.
Cloudflare Page Rules or cache settings that work well with Cloudways.
-
Amelia Turner commented
Yes, this is a common issue when using Cloudways + Cloudflare + Varnish + Breeze together, especially on sites that frequently update PDFs or page content. For example, your site https://www.suraahyaseenpdf.com
may be affected by this.Here are some suggestions to ensure updates appear instantly:
Breeze Settings (Cloudways Plugin):
Enable “Auto Purge” for pages/posts when updated.
Consider excluding PDFs or frequently updated pages from caching so they always load fresh.
Varnish Cache:
Varnish caches pages aggressively by default.
You can set Varnish rules to bypass cache for certain URLs or file types (like PDFs).
Use the “Purge on Update” feature so changes automatically clear the cache.
Cloudflare Configuration:
Use Page Rules for frequently updated URLs or PDF directories:
Cache Level: Bypass or Standard
Edge Cache TTL: Respect Origin Headers
Optionally, enable Automatic Cache Purge via API when content is updated.
Workflow Tip:
Combine these: let Breeze handle local cache, Varnish handle dynamic caching, and Cloudflare cache selectively.
Avoid full-page caching for pages that change often.
Summary:
Exclude PDFs or frequently updated pages from caching if possible.
Enable auto-purge on content updates in Breeze and Varnish.
Configure Cloudflare Page Rules to bypass cache for paths that update often.
This setup usually ensures that users see the latest content without needing to manually purge caches.