內容簡介
QuantumCache 是一款加速 WordPress 的外掛,透過快取資料庫查詢結果和內容片段,減少頁面渲染所需的資料庫工作,提升網站效能。它不會取代現有的頁面快取解決方案,而是作為補充。
【主要功能】
• 快取匿名請求的主要 WP_Query 結果
• 標籤式失效:依據文章 ID、文章類型或分類清除快取
• 內容片段快取支援 core 內容區塊
• 多種儲存模式:自動、Redis、MySQL
• 與 Redis 物件快取相容
• 提供 WP-CLI 指令進行快取管理
外掛標籤
開發者團隊
原文外掛簡介
QuantumCache accelerates WordPress by caching database query results and content fragments used to build pages. Instead of caching entire HTML pages, it reduces the database work required to render pages while preserving WordPress’s native invalidation behavior.
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_Query for anonymous requests.
Tag-based invalidation: purge by post ID, post type, or taxonomy.
Fragment caching for the_content (classic) and core blocks such as core/post-content, core/latest-posts, core/archives, and core/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.
WP-CLI commands: wp quantumcache flush and wp quantumcache status.
Metrics data layer: persistent hit, miss, store, and purge event counters available via Metrics::totals() and Metrics::deltas().
Performance summary
In benchmarks on a plugin-heavy WordPress site (WooCommerce + Yoast SEO),
QuantumCache reduced per-request database queries by up to ~99% on cached pages
and achieved cache hit rates exceeding 97% with Redis.
In the benchmark environment:
Redis mode reduced warm TTFB by roughly 23–27% and total response time by 18–21% versus an uncached baseline.
MySQL fallback mode delivered modest improvements (~3–10%) when Redis was unavailable.
Actual results depend on theme complexity, plugin load, database topology, and traffic patterns.
When to use QuantumCache
QuantumCache is useful when:
Your site already uses a page cache (such as a CDN, reverse proxy, or caching plugin) but WordPress still performs significant database work.
You want faster response times without relying solely on full-page caching.
Your hosting environment supports Redis, or you want a portable MySQL fallback.
QuantumCache complements page caching rather than replacing it.
What QuantumCache does NOT do
QuantumCache is not a page cache or full HTML cache.
It does not replace solutions such as:
* CDN caching
* reverse proxy caches
* traditional WordPress page caching plugins
Instead, QuantumCache reduces the database work required to build pages, making those systems more effective.
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.
WP-CLI commands
QuantumCache provides the following WP-CLI commands:
wp quantumcache status
Shows the active backend, storage mode, and lifetime cache counters.
wp quantumcache flush
Clears all cache entries for the current site.
Use –yes to skip the confirmation prompt.
QuantumCache Pro
QuantumCache Pro extends the core engine with advanced caching capabilities for WooCommerce and logged-in users.
See: https://quantumcache.io
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.
