Beschrijving
QuantumCache
Beschrijving
QuantumCache speeds up WordPress by caching database query results (not full pages). It integrates with WordPress query execution to cache post ID lists and content fragments that WordPress uses to build pages, reducing database load while preserving correct invalidation.
It is not an output buffer or page cache, and it does not replace existing page caching solutions.
Features
- Caches the results of the main front-end
WP_Queryfor anonymous requests. - Tag-based invalidation: purge by post ID, post type, or taxonomy.
- Fragment caching for
the_content(classic) and core blocks such ascore/post-content,core/latest-posts,core/archives, andcore/navigation. - Multiple storage modes:
- Auto – use Redis if available, otherwise fall back to MySQL.
- Redis – fastest mode; uses the PHP Redis extension.
- MySQL – portable fallback using compact tables (
qc_entries,qc_tagmap).
- Compatible with the Redis Object Cache drop-in.
- Avoids wp_options and postmeta storage – all cache data is stored in Redis or
QuantumCache-owned database tables. - Multisite-aware: per-site prefixes and per-site tables.
Performance summary
In local benchmarks, QuantumCache reduced database query execution by approximately 70–75% on cached pages and achieved cache hit rates above 95% when using Redis.
Under production-like load with a networked database, these reductions translated to roughly 20–40% higher throughput and 20–35% lower 95th-percentile response latency compared to baseline WordPress.
Actual results depend on theme, plugins, database topology, and traffic patterns.
Debug headers (optional)
Enable Settings QuantumCache Send X-QC debug headers to view cache status in HTTP responses:
* X-QC-Main: HIT | MISS | STORE
* X-QC-Store: AUTO | redis | mysql
* X-QC-Hydrated: number of posts loaded from cache
Append ?qc_nocache=1 to any URL to bypass caching for that request.
Debug headers are sent only when explicitly enabled in settings and contain no
personal or user-specific data.
Privacy
QuantumCache does not collect, send, or log personal data.
It stores cache entries in Redis or its own MySQL tables.
Other plugins on your site may handle cookies or data independently.
No remote requests are made, and no data is transmitted to external servers.
Installatie
- Upload the
quantumcachefolder to/wp-content/plugins/and activate it. - (Optional) You may install the Redis Object Cache plugin for additional Redis features. QuantumCache works independently.
- Go to Settings QuantumCache:
- Choose a store mode: Auto, Redis, or MySQL.
- Configure Redis host/port if not already set by constants.
- Optionally enable debug headers.
- Load a public page twice. On the second load, the response should include
X-QC-Main: HIT.
FAQ
Does it cache logged-in users?
No. QuantumCache focuses on anonymous (front-end) traffic to ensure safe invalidation. Logged-in caching is not included.
Do I need Redis?
Redis is recommended for best performance, but not required. QuantumCache automatically falls back to its internal MySQL store.
Does it cache admin pages, feeds, or searches?
No. Those are intentionally excluded.
Is it Multisite-compatible?
Yes. Each site uses its own prefix and tables. Purge actions apply per site.
How do I purge the cache?
From Settings QuantumCache:
* Purge Everything – clears all QuantumCache entries for this site.
* Purge by Tag – e.g.post:123ortaxonomy:category.
* Purge by URL – resolves to post/taxonomy tags automatically.Which fragments are cached?
- Classic themes –
the_contenton singulars. - Block themes –
core/post-contentand common navigation/listing blocks.
- Classic themes –
Does it cache dynamic content or nonces?
No. Fragments containing nonces, tokens, or user-specific data are skipped automatically.
Does this replace my page cache or CDN?
No. QuantumCache operates below page caches and CDNs by reducing database and
rendering overhead. It is designed to complement, not replace, page caching
solutions.What happens on uninstall?
Unless the
quantumcache_preserve_data_on_uninstallfilter returns true, QuantumCache removes its own tables and options. No wp_options or postmeta entries are left behind.
Beoordelingen
Er zijn geen beoordelingen voor deze plugin.
Bijdragers & ontwikkelaars
“QuantumCache” is open source software. De volgende personen hebben bijgedragen aan deze plugin.
BijdragersVertaal “QuantumCache” in je eigen taal.
Interesse in ontwikkeling?
Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.
Changelog
0.1.5
- Security: Hardened direct database access by validating and escaping internal
table identifiers to satisfy PluginCheck and reviewer requirements. - Code: Resolved all PluginCheck warnings; no functional behavior changes.
- Cleanup: Removed development-only tooling files from the release package.
- Stability: Minor internal cleanup following load testing and runtime validation.
0.1.4
- Fix: Fixed incomplete Stats.php code concerning MySQL reporting
- Fix: Prefixed all global functions and variables (qc_* quantumcache_*) to satisfy Plugin Check naming requirements.
- Fix: Updated uninstall routine to use prefixed globals and updated option names.
- Fix: Added defensive table-name validation and explicit casting in Maintenance and Stats to address Plugin Check warnings.
- Fix: Corrected several internal calls referencing the old function names (qc_should_debug_headers, etc.), preventing runtime errors.
0.1.3
- Fix: Updated MySQLStore write operations to use $wpdb->insert() with format arrays, resolving the PHPCS / reviewer-required change.
- Fix: Corrected StoreFactory to pass the required $wpdb instance when constructing MySQLStore, restoring MySQL fallback functionality.
0.1.2
- Admin: refined settings layout, help text, and capability/nonce checks.
- Code: PHPCS/WPCS compliance (sanitization, escaping, Yoda, no short ternaries).
- Store: Redis “Purge Everything” via SCAN/DEL with site prefix.
- Store: MySQL tag mapping writes via
wpdb->insert()with formats. - Read path: safe request URI normalization for keys and display.
0.1.1
- Fix: hydration logic in
on_posts_pre_query()(now primes and hydrates safely). - Perf: archive hit path uses
update_post_caches()without taxonomy overhead. - Safety: skip caching very small archives (fewer than 12 IDs).
- Headers: ensure
X-QC-Store-Actualreflects real backend.
0.1.0
- Initial public release.
- Query-level caching with tag-based invalidation.
- Fragment caching for
the_contentand key blocks. - Redis (preferred) and MySQL stores.
- Multisite support.
- Admin UI: store selection, Redis config, debug headers, purge controls, live stats.
- PHPCS clean (WordPress coding standards).



