=== SuperFlare Cache — Cloudflare Cache, Disk Cache & Speed Optimization ===
Contributors: jumedeenkhan
Tags: cloudflare, cache, pagespeed, speed optimization, cdn
Donate link: https://www.paypal.me/jumedeenkhan
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.0.6
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Serve Full Page Cache via Cloudflare CDN, and use Disk Cache as a fallback with Auto-purging. Boost PageSpeed, SEO, and Core Web Vitals.

== Description ==

SuperFlare Cache is a powerful full page cache plugin for WordPress. It makes your WordPress website load much faster by caching your pages in two places:

- At Cloudflare's edge (the "**Cloudflare Cache**"), so most visitors are served from Cloudflare's fast global network instead of your hosting server.
- On your own server (a "**Disk Cache**" fallback), so pages load fast even when Cloudflare is down, or even if your site is not on Cloudflare at all.

The best part: it **works with the free Cloudflare plan**. You do not need a paid plan or a Cloudflare APO subscription. Just connect your zone once and the plugin takes care of everything.

**Why do I need it?**

Normally, WordPress only lets Cloudflare cache files like images, CSS, and JavaScript. When someone visits an HTML page, your server still has to do all the work.

SuperFlare Cache changes that — your complete pages get cached too, so your server barely breaks a sweat and your visitors get an instantly fast page.

**Who is it for?**

Beginners and pros alike. You do not need to know what a "Cache Rule" or a "zone" is. The setup wizard asks you for your Cloudflare key, picks the right settings, and turns on caching for you.

**How does it work?**

1. Install and activate the plugin. A setup wizard opens automatically.
2. Paste your Cloudflare API Token (recommended) or Global API Key.
3. Pick your website's zone. Done — caching is on.

From then on, SuperFlare Cache:

- Keeps the Cloudflare Cache Rule it needs in sync automatically.
- Purges (removes) the right pages from the cache when you publish or update a post, so your visitors never see old content.
- Can preload pages in the background so nobody ever hits a slow, cold page.
- Never caches logged-in users, your admin area, search results, or error pages.
- Optionally saves pages on your server as a disk cache fallback, so a Cloudflare problem does not slow your site down.

= Quick Links =

- [Official Website](https://superflare.pro/) — the flagship Cloudflare cache & optimization plugin
- [Pricing & Plans](https://superflare.pro/pricing/) — compare the free plugin with SuperFlare Pro
- [Documentation](https://superflare.pro/docs/) — setup, configuration, and troubleshooting guide
- [Support](https://superflare.pro/support/) — get help when you need it
- [Contact](https://superflare.pro/contact/) — reach our team directly
- [About](https://superflare.pro/about/) — the story behind SuperFlare

= The two caches, simply explained =

**Cloudflare Cache (edge cache).** 

Your full HTML pages are stored on Cloudflare's network, close to your visitors. When someone opens a page, Cloudflare sends it from the edge — often without even touching your server. This is the biggest speed boost this plugin gives you.

**Disk Cache (fallback cache).** 

A copy of each page is also saved on your own server. If Cloudflare is unavailable or misconfigured, your site still serves a fast, pre-built page instead of rebuilding it every single visit. The disk cache even works without a Cloudflare account.

Both are fully automatic. You can turn either one on or off and adjust their settings from the plugin's dashboard.

= Main features =

* Full-page Cloudflare caching on the free plan, with the Cache Rule created and synced for you.
* Fallback disk cache on your server with its own lifetime, headers, and trailing-slash options.
* Smart, queued purging — only the pages that change get cleared, in safe batches.
* Cache preloading so visitors never hit a cold, slow page.
* Easy exclusions — keep specific pages, cookies, shops, or login pages from being cached.
* Zone controls right in wp-admin — SSL/TLS, Security, and Speed settings.
* Built-in analytics — see requests, bandwidth, threats, and cache-hit rate at a glance.
* A guided setup wizard that hides the technical details.
* Works with WooCommerce, Easy Digital Downloads, and popular caching and hosting plugins.
* Activity log, settings export/import, and optional "keep my data" on uninstall.

= What never gets cached? =

To keep your site safe and correct, the plugin always skips:

- Logged-in users and comment authors.
- The WordPress admin area and login page.
- Password-protected pages.
- Search results, feeds, AJAX, and REST API requests.
- 404 and other error pages.

= SuperFlare Pro — take your site even further =

The free plugin already delivers edge caching, a disk cache fallback, smart purging, and full zone control. 

**SuperFlare Pro** stacks a complete advanced-performance toolkit on top, all inside the same settings screen:

* **Advanced analytics & reporting** — extended request metrics, an edge-cache status chart, status-code breakdowns, top-list breakdowns, and PNG chart export.
* **Edge caching upgrades** — Cloudflare Cache Reserve and Smart Tiered Cache to push content even closer to your visitors, plus HTTP/2 Server Push.
* **Advanced image optimization** — additional WebP formats and automatic resizing/transformation on top of the free WebP support.
* **Advanced minification** — deeper HTML, CSS, and JavaScript minification of assets and files for a smaller, faster page.
* **Defer & delay JavaScript** — remove render-blocking scripts and load the rest only when a visitor actually needs them.
* **Google Fonts optimization** — combine and serve fonts locally for better Core Web Vitals.
* **Advanced preloader** — discover URLs from sitemaps, menus, and more, with configurable counts and scheduling.
* **Resource hints** — link prefetching, DNS prefetch, and preconnect.
* **Granular store controls** — finer WooCommerce and Easy Digital Downloads cache handling.
* **Session reliability** — nonce refresh and advanced server-side exclusions.
* **Heartbeat Control** — tame WP-Cron's heartbeat to cut server load.
* **Database optimization** — clean up revisions, auto-drafts, trash, and transients in one click.
* **Deeper cache sync** — flush Varnish, OPcache, and popular caching plugins, and compatible with major hosting setups.
* **Priority email support** directly from the team that built SuperFlare.

[Compare plans & pricing](https://superflare.pro/pricing/) · [Explore all Pro features](https://superflare.pro/) · [Read the docs](https://superflare.pro/docs/) · [Contact us](https://superflare.pro/contact/)

== Installation ==

1. In your WordPress admin, go to Plugins > Add New and search for SuperFlare Cache.
2. Install and activate the plugin — a setup wizard opens automatically.
3. Paste your Cloudflare API Token (recommended) or Global API Key.
4. Confirm your website's zone. The plugin creates and syncs the Cache Rule it needs.
5. Open Settings > SuperFlare Cache to fine-tune purging, exclusions, zone controls, and the disk cache.

That is it. No Cloudflare dashboard digging required.

== Frequently Asked Questions ==

= Do I need a paid Cloudflare plan? =

No. SuperFlare Cache works with the free Cloudflare plan and also scales to Pro, Business, and Enterprise.

= Why should I use a Cloudflare Cache plugin at all? =

By default, Cloudflare only caches static files (images, CSS, JS). HTML pages still load from your server every time. This plugin caches complete pages at Cloudflare's edge, so your whole site loads fast even on the free plan.

= Is the disk cache different from the Cloudflare cache? =

Yes. The Cloudflare cache stores pages on Cloudflare's network. The disk cache stores pages on your own server and acts as a fallback — it keeps your site fast if Cloudflare is down, and it works even without a Cloudflare account.

= Do I have to create or edit a Cache Rule? =

No. The plugin creates and syncs the single Cache Rule it manages, automatically, and never touches your other rules. If the rule is deleted by mistake, it comes back on the next connect.

= Will my pages ever show old content? =

No. When you publish or update a post, the plugin purges just that page (and, optionally, related pages you choose). The rest of the cache stays warm.

= Do I need a developer to set this up? =

No. The guided setup wizard connects your zone in a few clicks. Most settings have sensible defaults that work out of the box.

= How do I keep my shop (WooCommerce) from being cached? =

Cart, checkout, and account pages are excluded automatically by default, so customer sessions are never served stale.

= How do I keep one specific page from being cached? =

Open that page in the editor and turn on "Never cache this page" in the SuperFlare settings box. You can also add URL, cookie, or query-string exclusions.

= API Token or Global API Key? =

An API Token scoped to just the permissions the plugin needs is recommended. The Global API Key still works for accounts that need it.

= Is my API Token or Key stored safely? =

Yes. Your credentials are encrypted, kept outside normal autoloaded options, and shown masked. They are only ever sent to Cloudflare's API over HTTPS.

= How can I check that caching is working? =

Open a page in a private/incognito window and look at its response headers. `cf-cache-status: HIT` means the page came from Cloudflare's edge. `MISS` means it was fetched fresh. `BYPASS` means the page is intentionally excluded.

= What happens if I deactivate the plugin? =

Your managed Cache Rule stays in place, so Cloudflare keeps serving cached pages. Only your disk cache and scheduler are cleaned up. The Rule is removed only when you delete the plugin.

== Screenshots ==

1. Dashboard and Cloudflare traffic analytics, activity log, and cache-hit summary.
2. Guided Cloudflare setup wizard — connect your zone with an API Token or Global API Key.
3. General settings — purge controls, preloading, and cache behavior.
4. Caching tab — Cloudflare page cache, disk cache, bypass caching, and advanced exclusions.
5. Purge Cache tabs — Cloudflare page cache, Cache TTLs, preloading, and queue settings.
6. Speed Compression, Protocols, Images, JavaScript, Loading Controls.
7. Optimization — Database, HTML, Fonts, Prefetch Brotli, HTTP/3, WebP Optimization.
8. Advanced Settings — Developer Mode, Automation, Debug, Import/Export and Reset Settings.

== Upgrade Notice ==

= 2.0.6 =

No setup required. The Activity Log is more accurate, log-size settings were
improved, and the old log-size option cleans itself up on the next save.

= 2.0.5 =

Re-save your settings so the disk-cache drop-in regenerates.
This version also includes a cleaner activity log and new analytics and speed options.
Please re-save your settings after updating.

== Changelog ==

= 2.0.6 =

* Fixed the admin-bar purge button not working on the front end.
* Activity Log lists every event individually — repeated purges are no longer collapsed into one row.
* "View All" now shows the whole log, and the footer shows the true total.
* New Advanced setting "Max entries to keep" bounds the log by event count on top of the file-size limit.
* Log-size option renamed internally; the old key is cleaned up automatically on the next settings save.

= 2.0.5 =

* Disk cache no longer breaks after moving the site.
* Drop-in now uses WP_CONTENT_DIR instead of a hardcoded path.
* Disk-cache analytics — a local Requests-Over-Time chart, and cached vs missed comparison on the requests charts.
* Free speculative loading (Prefetch Browser Pages) via the Speculation Rules API.
* Native lazy-loading for images, iframes, and video.
* New free zone toggles: Server-Side Excludes, Early Hints, Cloudflare Fonts, Speed Brain.
* Unified edge Cache-Control TTL; max-age cap raised to 1 year (default 1 month).
* Browser cache max-age removed; HTML pages now use s-maxage only.
* Stale-while-revalidate and ignore-marketing-parameters moved to General.
* Cleaner activity log; cache size now shows KB below 1 MB; WP-CLI commands.
* Disk Cache Behavior card merged into Disk Cache Configuration.
* Clearer "Clear disk cache" button; progress spinner on Reset Settings.

= 2.0.4 =

* Fixed cacheable headers being sent to file downloads and non-HTML responses.
* Fixed PDFs and invoices no longer being left publicly cached at the edge.
* Fixed "Purge HTML Only" missing archive, author, and custom-post-type URLs.
* Raised the post cap so large sites purge completely.
* Added a local disk cache at origin.
* Added configurable cache lifetime, header storage, and trailing-slash handling.

= 2.0.3 =

* Credentials now encrypted at rest, outside autoloaded options, and shown masked on the settings page.
* Cloudflare settings sync moved off the save request — no slow saves.
* Added translation support (i18n-ready).
* Purge queue with exponential backoff retries, stopping after repeated failures.
* Clearer API errors — 401 (auth), 403 (permission), 429 (rate limit) explained.
* Preloader throttled to small cron-fed batches.

= 2.0.2 =

* Improved sitemap preloading security, safer URL checks, and secure XML handling.
* Renamed the admin toolbar cache purge button to "Purge SF Cache".

= 2.0.1 =

* Fixed wildcard cookie exclusions at Cloudflare's edge.
* Improved failed purge retries and large purge queue handling.
* Improved Custom Purge for large URL lists with safe batches.

= 2.0.0 =

* Rebuilt the plugin around a guided setup wizard supporting API Token and Global API Key.
* Added queued, batched cache purging to stay under Cloudflare's API rate limits.
* Added optional cache preloading after purge.
* Added zone controls for Security, SSL/TLS, and Speed.
* Added a Cloudflare traffic insights dashboard.
* Added per-post "Never cache this page" control.
* Added URL and cookie-based cache exclusions.
* Added configurable purge capability and JSON settings export.
* Consolidated plugin settings into a single option and reorganized the codebase.

= 1.8.0 =

* Fixed duplicate Cloudflare syncs and Browser Cache TTL issues.
* Fixed Reset Settings defaults and improved settings reliability.

= 1.7.0 =

* Added broader cookie bypass support and REST API (/wp-json) bypass.

= 1.6.0 =

* Improved settings security, cache purging, domain detection, and Cloudflare request handling.
* Fixed deactivation, reset, admin bar, and API Token issues.
* Improved sitemap and cache bypass handling.

= 1.5 =

* Added Cloudflare API Token authentication and automatic domain selection.
* Migrated full-page caching from Page Rules to Cloudflare Cache Rules.
* Added logged-in user, cookie, URL, sitemap, and robots.txt cache exclusions.
* Added Browser and Edge Cache TTL controls and improved cache purging.
* Added connection status, Reset Settings, and improved security and error handling.

= 1.2.1 =

* Updated license details.

= 1.2 =

* Added homepage, custom URL, latest post, and full cache purge options.
* Added Page Rule creation, Browser Cache TTL, and block-editor purge support.
* Improved cache exclusions, comment purging, and WordPress compatibility.

= 1.0.3 =

* Tested up to WordPress 5.8.

= 1.0.1 =

* Updated max-age behavior for Cloudflare caching.

= 1.0 =

* Initial release.
