Description
Flex Cache stores full HTML pages for anonymous visitors. On later visits, fast page serving can return that HTML before WordPress fully loads.
- File-based page cache under wp-content/cache/flex-cache
- Optional Redis page store when the PHP Redis extension and a Redis server are available (files stay as backup)
- Fast page serving via WordPress
advanced-cache.php(only if no other cache plugin already provides it) - Optional button to add
define( 'WP_CACHE', true );to wp-config.php (backup is created first) - Purge all / purge URL from the admin bar
- Auto-purge on content updates
- Bypasses logged-in users, carts, POST, previews, feeds, search, and sitemaps
- Optional conservative HTML minify
Redis is never turned on by itself. This plugin does not install object-cache.php and does not replace a WordPress object-cache plugin.
No remote calls. CSS and JavaScript load from this plugin only.
Privacy
Flex Cache stores cached HTML for anonymous pages as files under wp-content/cache/flex-cache/. It does not log visitors, IP addresses, or user agents.
If you turn Redis on, the same HTML is also stored in Redis on a host you configure. Your Redis password (if you set one) is stored only in the WordPress options table via the Settings API. Fast page serving uses a non-executable settings.json in the cache folder (enabled, TTL, host, port — no password). If Redis requires a password before WordPress loads, add define( 'FLEX_CACHE_REDIS_AUTH', 'your-password' ); to wp-config.php yourself. Flex Cache does not send data to FLEX or any third-party service.
Redis is software you or your host run. This plugin does not create a Redis account and does not load redis.io.
Limitations
- Logged-in visits are never cached, including the WordPress admin.
- Only one plugin can provide fast page serving. Flex Cache will not overwrite another plugin’s
advanced-cache.php. - Enabling WordPress cache mode writes one line to wp-config.php only when you click the button (or you can add the line yourself).
Installation
- Upload the
flex-cachefolder to/wp-content/plugins/, or install the zip via Plugins Add New Upload Plugin. - Activate Flex Cache.
- Go to Flex Cache Settings.
- Click Enable WordPress cache mode if that row says Needs setup (or add
define( 'WP_CACHE', true );to wp-config.php above “That’s all, stop editing!”). - Click Turn on fast page serving, enable cache, and save.
- Open the site in a private window (logged out). A hit should send the header
X-Flex-Cache: HIT. - Optional: open the Redis tab if you want Redis as a faster store.
FAQ
-
Does this replace Redis Object Cache?
-
No. Flex Cache stores full HTML pages. An object-cache plugin stores WordPress objects (options, queries). They can run together. Flex Cache will not install
object-cache.php. -
Does Redis need a password in wp-config.php?
-
Only if Redis requires AUTH and you want early hits from Redis. The password in Flex Cache Redis is stored in the database and is used after WordPress loads (writes and admin checks). Fast page serving cannot read that option yet. Add
define( 'FLEX_CACHE_REDIS_AUTH', 'your-password' );above “That’s all, stop editing!” if you need Redis on those early hits. Otherwise files are used. -
Why is Redis On disabled?
-
The PHP Redis extension is missing, or no Redis server answered at the saved host and port. File cache still works. Save the connection after Redis is running; On stays disabled until the Server badge says Connected.
-
Will this conflict with another cache plugin?
-
Possibly. Only one plugin can provide fast page serving. If another cache plugin already wrote
advanced-cache.php, Flex Cache will not overwrite it. Disable that plugin first, then click Turn on fast page serving. -
Why are there 0 cached files?
-
You are logged in as an administrator. Logged-in visits are skipped on purpose. Load a page in a private/incognito window, then refresh Settings.
-
Does Flex Cache write to wp-config.php?
-
Only if you click Enable WordPress cache mode. It inserts
define( 'WP_CACHE', true );and keeps a.flex-cache-bakbackup. You can add the line yourself instead. Uninstall does not remove that line. -
What happens when I uninstall?
-
Fast page serving is turned off (only if Flex Cache turned it on), cached files are deleted, Flex Cache Redis keys are cleared if Redis was On, and settings are removed.
WP_CACHEin wp-config.php is left in place.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Flex Cache” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Flex Cache” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.5
- Early-serve snapshot is non-executable JSON with no Redis password. Password stays in the Settings API.
- Optional
FLEX_CACHE_REDIS_AUTHin wp-config.php for password-protected Redis before WordPress loads.
1.0.4
- WordPress.org submission hygiene: complete readme (privacy, install, FAQ).
- About FLEX links only to Flex plugins listed on WordPress.org.
- Store the early-serve snapshot as PHP (not JSON) and deny HTTP access to the cache folder.
1.0.3
- Probe Redis and show Available / Not available / In use.
- Optional Redis page store (files remain as backup). Not a WordPress object cache.
1.0.2
- Fix cache keys so HTTPS proxies hit the same files that were written.
- Do not cache HEAD, password-protected, HTTP-auth, or Set-Cookie responses.
- Narrow WooCommerce bypass to cart/session cookies; skip 404s, feeds, search, and robots.
- Purge on delete/trash/term/widget changes; ignore autosaves, revisions, and unapproved comments.
- Atomic cache writes, expired-file cleanup, and ignore tracking query parameters.
- Optional button to add WP_CACHE to wp-config.php.
1.0.1
- Match the Flex Redirects admin UI: shared header, stats, cards, and badges.
1.0.0
- Initial release.
