FAQ
Frequently asked questions about MilliCache.
General Questions#Copied!
What is MilliCache?#Copied!
MilliCache is a full-page caching plugin for WordPress that stores complete HTML pages in Redis (or compatible stores like ValKey, KeyDB, or Dragonfly). When a visitor requests a cached page, MilliCache serves it directly from memory without loading WordPress, resulting in sub-10ms response times.
How is MilliCache different from other caching plugins?#Copied!
| Feature | MilliCache | Other Plugins |
|---|---|---|
| Storage | Redis/ValKey/KeyDB | Files/Database |
| Speed | Sub-10ms | 50-200ms |
| Rules Engine | MilliRules (powerful) | Basic conditions |
| Flag-based Invalidation | Yes | Limited |
| Multisite | Full support | Varies |
| License | GPL-2.0+ | Varies |
Does MilliCache require Redis?#Copied!
Yes, MilliCache requires a Redis-compatible server. Supported options:
- Redis (original)
- ValKey (open-source fork)
- KeyDB (multithreaded)
- Dragonfly (high-performance)
Is MilliCache free?#Copied!
Yes, MilliCache is free and open-source under GPL-2.0+ license.
Is there a Pro version?#Copied!
Yes. MilliCache Pro adds premium modules on top of the free plugin: a cache entries browser, a visual rules builder, block editor cache intelligence, preloading, detailed metrics, edge caching, an asset CDN, and a persistent object cache. It bundles MilliCache, so it replaces the free plugin rather than running alongside it.
Installation & Setup#Copied!
What are the requirements?#Copied!
- PHP 7.4 or higher
- WordPress 5.6 or higher
- Redis, ValKey, KeyDB, or Dragonfly server
How do I know if caching is working?#Copied!
-
Enable debug mode:
1define( 'MC_CACHE_DEBUG', true ); -
Visit a page (logged out)
-
Check response headers:
- First visit:
X-MilliCache-Status: miss - Second visit:
X-MilliCache-Status: hit
- First visit:
Do I need to configure anything after installation?#Copied!
Basic setup requires:
-
Add to
wp-config.php:1define( 'WP_CACHE', true ); -
Install the drop-in:
1wp millicache drop
If Redis runs on default settings (localhost:6379), no additional configuration is needed.
Caching Behavior#Copied!
What gets cached?#Copied!
Cached:
- GET and HEAD requests
- 200 OK responses
- Anonymous visitors (logged-out)
- Pages, posts, archives, taxonomies
- RSS feeds (by default)
Not Cached:
- POST, PUT, DELETE requests
- Logged-in users
- Non-200 responses
- AJAX, REST API, XML-RPC, Cron
- WP-CLI commands
Why aren't logged-in users cached?#Copied!
Logged-in users see personalized content (admin bar, user-specific data). Caching would show incorrect content. This is a security and UX best practice.
Can I cache logged-in users?#Copied!
It's not recommended. If you need it:
- Remove the logged-in rule via filter
- Add user-specific flags
- Ensure no sensitive data leaks
What is the grace period?#Copied!
The grace period allows stale cache to be served while fresh content generates in the background. This prevents visitors from waiting for page generation after cache expires.
Example with TTL=1 day, Grace=30 days:
- Day 1: Fresh cache served
- Day 2: Cache expired, but grace serves stale while regenerating
- Day 31: Grace expired, visitor waits for fresh content
How does cache invalidation work?#Copied!
MilliCache uses flags (tags) for targeted invalidation:
- Each page is tagged with flags (e.g.,
post:123,home,archive:post) - When content changes, related flags are identified
- Only pages with matching flags are cleared
This means updating one post doesn't clear the entire cache—only affected pages.
Compatibility#Copied!
Does MilliCache work with WooCommerce?#Copied!
Yes, and the critical pages are safe out of the box: WooCommerce sets the
DONOTCACHEPAGE constant on the cart, checkout, and my-account pages, and a
built-in MilliCache rule respects it. You do not need path exclusions for a
standard setup.
What you should configure is cookie handling. WooCommerce sets several cookies for ordinary browsing visitors, and any cookie MilliCache does not ignore becomes part of the cache key, which fragments the cache into per-visitor variants:
sbjs_*: Order Attribution tracking (Sourcebuster), set for every visitorwoocommerce_recently_viewed: set as soon as a visitor views a productwoocommerce_cart_hash,woocommerce_items_in_cart,wp_woocommerce_session_*: set once something is in the cartstore_notice*: set when a visitor dismisses a store notice
Ignore all of them:
1define( 'MC_CACHE_IGNORE_COOKIES', [
2 '_*', // Keep the default (analytics cookies)
3 'sbjs_*',
4 'woocommerce_*',
5 'wp_woocommerce_session_*',
6 'store_notice*',
7] );
Do not put woocommerce_* or sbjs_* into MC_CACHE_NOCACHE_COOKIES.
woocommerce_recently_viewed matches that pattern and is set the moment anyone
views a product, so a blanket bypass silently turns most of your browsing traffic
into cache misses. Bypassing is also unnecessary: themes add products to the cart
via AJAX and refresh the mini cart client-side (cart fragments in classic themes,
the Store API in the Mini-Cart block), so shop and product pages stay correct even
for visitors with items in their cart.
Two exceptions:
-
If your theme renders cart contents into the page server-side without any AJAX refresh (rare in modern themes), bypass for visitors with a cart instead of ignoring: add
woocommerce_items_in_carttoMC_CACHE_NOCACHE_COOKIES. -
If you use custom dynamic pages WooCommerce does not know about (a custom order tracking page, for example), exclude them by path:
1define( 'MC_CACHE_NOCACHE_PATHS', [ '/order-tracking/*' ] );
To verify the result, watch the hit ratio on the Status tab after deploying the configuration. MilliCache Pro makes this much easier to inspect: the Cache Entries Browser lists every cached page with its variants, so you can see exactly what gets cached and spot cookie-driven fragmentation, and Detailed Metrics charts the hit ratio over time.
Does MilliCache work with membership plugins?#Copied!
Yes. Common configurations:
1// MemberPress
2define( 'MC_CACHE_NOCACHE_COOKIES', [
3 'wp-*pass*',
4 'memberpress_*',
5 'mepr_*',
6] );
7
8// Restrict Content Pro
9define( 'MC_CACHE_NOCACHE_COOKIES', [
10 'wp-*pass*',
11 'rcp_*',
12] );
Can I use MilliCache with a CDN?#Copied!
Yes! MilliCache caches at the origin server. CDN caches on edge servers. They work together:
- CDN checks its cache
- CDN miss → Request reaches origin
- MilliCache serves from Redis (fast!)
- CDN caches the response
For cache clearing, you may need to:
- Clear MilliCache (origin)
- Clear CDN (edge)
MilliCache Pro's Edge Cache module automates exactly this: pages are tagged at the CDN with the same flags they carry locally, and every local purge triggers the matching edge purge.
Does MilliCache work with Cloudflare/other proxies?#Copied!
Yes. MilliCache operates at the origin level, before any proxy/CDN.
Does MilliCache conflict with other caching plugins?#Copied!
Yes, you should only use one full-page caching plugin. Deactivate others before using MilliCache:
- WP Super Cache
- W3 Total Cache
- WP Fastest Cache
- LiteSpeed Cache
- etc.
Object caching plugins (Redis Object Cache) are fine — they cache different things.
Multisite#Copied!
Does MilliCache support multisite?#Copied!
Yes, fully. Features include:
- Per-site cache isolation
- Multi-network support
- Site and network-level clearing
- Per-site configuration options
How do I clear cache for one site only?#Copied!
1# By site URL
2wp millicache clear --url=site1.example.com
3
4# By site ID
5wp millicache clear --site=2
How do I clear cache for all sites?#Copied!
1# All sites in network
2wp millicache clear --network=1
3
4# All cache (all networks)
5wp millicache clear
Performance#Copied!
How fast is MilliCache?#Copied!
| Scenario | Typical Response Time |
|---|---|
| Cache hit | 5-15ms |
| Cache miss (WordPress) | 200-2000ms |
That's 10-200x faster than uncached WordPress.
How much memory does MilliCache use?#Copied!
Memory usage depends on:
- Number of cached pages
- Average page size
- Compression enabled
Typical usage with 1000 pages:
- Without compression: ~50-100MB
- With compression: ~15-30MB
Should I enable compression?#Copied!
Yes, for most sites:
1define( 'MC_CACHE_GZIP', true );
Benefits:
- 60-80% smaller cache entries
- Lower memory usage
- Faster cache retrieval
Requires ext-zlib PHP extension.
WP-CLI#Copied!
What commands are available?#Copied!
| Command | Description |
|---|---|
wp millicache clear |
Clear cache |
wp millicache stats |
View statistics |
wp millicache status |
Check status |
wp millicache test |
Test connection |
wp millicache drop |
Fix drop-in |
wp millicache cli |
Open Redis CLI |
wp millicache config |
Manage settings |
How do I clear cache via cron?#Copied!
1# Add to crontab
20 3 * * * cd /path/to/wordpress && wp millicache clear --expire
The --expire flag serves stale content while regenerating (gentler).
Security#Copied!
Does MilliCache cache sensitive data?#Copied!
MilliCache does not cache:
- Logged-in users
- POST requests
- Pages with excluded cookies
This prevents accidental caching of sensitive data.
Is the Redis connection secure?#Copied!
For security:
- Use authentication:
MC_STORAGE_USERNAMEandMC_STORAGE_PASSWORD - Bind Redis to localhost if on same server
- Use private networks for remote Redis
- Consider Redis TLS for sensitive environments
Does MilliCache modify WordPress core?#Copied!
No. MilliCache uses WordPress's official drop-in caching API (advanced-cache.php). It doesn't modify core files.
Troubleshooting#Copied!
Why isn't my page being cached?#Copied!
Check debug headers (MC_CACHE_DEBUG = true):
| Status | Meaning |
|---|---|
| No headers | Drop-in not installed |
bypass |
Rule prevented caching |
miss |
First request, will cache |
hit |
Cached and serving |
Common bypass reasons:
- Logged in
- Excluded cookie
- Excluded path
- POST request
- Non-200 response
- Response larger than 5MB
Why is cache not clearing?#Copied!
- Clear manually:
wp millicache clear - Check Redis connection:
wp millicache test - Verify clearing hooks: Check
millicache_cache_clearedaction - Clear external caches (CDN, proxy)
Where can I get help?#Copied!
Next Steps#Copied!
- Troubleshooting - Detailed problem solving
- Installation & Quick Start - Get started fast
- WP-CLI Commands - Command reference
Last updated:
Release updates
Get notified when new versions and guides ship. No spam.
By subscribing you agree to our Privacy Policy. Double opt-in, no spam, unsubscribe anytime.