[WordPress] 外掛分享: Flexa Cache

首頁 › 外掛目錄 › Flexa Cache
WordPress 外掛 Flexa Cache 的封面圖片
全新外掛
安裝啟用
—
尚無評分
32 天前
最後更新
—
問題解決
WordPress 5.9+ PHP 8.2+ v1.3.2 上架:2026-07-11

內容簡介

Flexa Cache 是一款 WordPress 頁面快取及前端優化外掛,具備可選的 Redis 物件快取功能。它將每個頁面儲存為靜態 HTML 檔案,提升網站速度並減少伺服器負擔。

【主要功能】
• 靜態 HTML 檔案快取,提升載入速度
• 支援 Apache 和 nginx 伺服器
• 可選擇使用 Redis 物件快取
• 自動清除快取的多種事件觸發
• 排除特定頁面和請求的快取

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.3.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Flexa Cache」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

📌 Documentation: flexa-cache.flexacommerce.com has the full user guide, technical reference and benchmark.
Flexa Cache is a WordPress page cache and front-end optimization plugin, with an optional Redis object cache. The page cache is a file cache: it saves each page as a static HTML file (plus a gzip copy) and an advanced-cache.php drop-in serves that file before WordPress loads, so a cache hit runs no theme, plugin or database code. WP Fastest Cache and W3 Total Cache use the same technique. It works on Apache and nginx.
What the page cache stores, and what it skips
Only anonymous GET requests for normal front-end pages are cached. These are always served live and never stored:

Logged-in users (always, whatever the settings say), and visitors with a comment-author or post-password cookie
WooCommerce cart, checkout and account pages, and any visitor with items in the cart or a WooCommerce session
URLs with a query string, and any request that is not GET (form posts, for example)
wp-admin, admin-ajax.php, the REST API (/wp-json/), WP-Cron, feeds, search results, previews, 404 pages and password-protected posts
Pages that define DONOTCACHEPAGE
Anything on your own exclusion lists: URLs, cookies and user agents. A new install starts with /cart, /checkout and /my-account in the URL list.

Cached files have no expiry time. They are replaced when one of the events below clears them.
When the cache is cleared

Publishing, updating, trashing, unpublishing or deleting a post clears that post’s page, the home page, the post type archive, its category, tag and other term archives, its author archive and its date archives, including their paginated pages. When a slug changes, the old address is cleared too.
Adding or removing a category or tag on a published post clears both the old and the new term archive.
A new, edited or re-moderated comment clears its post.
Saving a WooCommerce product or changing its stock clears the product page.
Switching theme, saving the Customizer, editing a menu or moving widgets clears everything.
Saving settings with a changed exclusion list, or turning the page cache or the master switch off and on, clears everything.
Updating Flexa Cache clears everything once, so pages built by the old version are not kept.
You can clear one URL or everything from the admin screen, WP-CLI or the REST API. If “Preload” is on, a full clear is followed by a crawl that rebuilds the cache.

Turning things off
Every feature has its own switch. “Enable page cache” only controls the page cache: with it off, the optimizations, widget cache and object cache you turned on keep running. To stop everything at once, turn off Enable Flexa Cache, the master switch at the top of General Settings. That removes the page cache drop-in, the .htaccess rules and the object cache drop-in, and nothing is cached or optimized. Your other settings stay saved, so turning the master switch back on restores them as they were.
Host and CDN caches
Flexa Cache only manages its own files. It does not purge Cloudflare, Varnish, LiteSpeed, Nginx FastCGI cache or a managed host’s server cache. It does detect them (along with other caching plugins) and shows a warning on the Cache screen and in Site Health. If another layer caches your HTML, either turn one of them off or clear that layer after you publish changes; otherwise it can keep serving pages Flexa Cache has already cleared.
Page Cache

Static HTML cache served by a pre-WordPress drop-in (no PHP/MySQL on cache hits)
Gzip pre-compressed .gz files served natively
Separate mobile cache variant (index-mobile.html) when Mobile Theme is enabled
Smart invalidation: purge on new post, updated post, comments, theme/menu/widget changes, and WooCommerce product/stock updates
Per-URL cache purge from the admin UI, WP-CLI, or REST API
Cache preloader via Action Scheduler (or WP-Cron fallback) with start/cancel/status controls
Widget output cache with O(1) versioned-key invalidation

Front-End Optimization

Minify HTML (whitespace collapse) and Minify HTML Plus (inline CSS/JS trim)
Minify CSS and Minify CSS Plus (deeper punctuation squeeze)
Combine CSS — adjacency-only buffer fusion preserving cascade order
Combine JS / Combine JS Plus — concatenate header and footer scripts
Gzip — mod_deflate .htaccess block for dynamic (non-cached) responses
Browser Caching — Expires/Cache-Control .htaccess block
Disable Emojis — remove WordPress emoji scripts, styles, and DNS prefetch
Lazy Load — native loading="lazy" + decoding="async" on images and iframes
Render Blocking JS — add defer to render-blocking scripts
Google Fonts Async — rewrite Google Fonts to preload + onload swap with

Developer-Friendly

WP-CLI: wp flexa-cache clear [--url=], wp flexa-cache status, wp flexa-cache preload [start|status|cancel]
REST API: /flexa-cache/v1/cache/purge, /cache/stats, /cache/preload
Filterable hooks: flexa_cache/engine/is_cacheable, flexa_cache/engine/allowed_hosts, flexa_cache/engine/buffer, flexa_cache/store/dir, flexa_cache/purged, flexa_cache/settings/languages, and more
Kill switch: ?flexa_cache_optimize=0 disables optimization for a single admin request
Exclusion lists for URLs, cookies, user agents, CSS handles, and JS handles

Object Cache (Redis)

Persistent Redis object cache: caches WordPress options, transients, and post/term/user meta and query results across requests, cutting database load
Installs a self-contained object-cache.php drop-in with an in-memory L1 + Redis L2 layout
One-click enable/disable and a “Test & save connection” form that writes the config to wp-config.php (secrets never touch the database)
Crash-safe by design: if Redis becomes unreachable the site keeps running (degrades to in-memory) with an admin notice and a circuit breaker — never a white screen
Serializers (PHP, igbinary, JSON, msgpack) and compression (LZ4, Zstd, LZF), key prefetch, and alloptions splitting
Live analytics: hit-ratio / operations / memory charts, a per-group key table, Query Monitor panel, and WP-CLI (analytics, watch, groups, slowlog)
Multisite aware, with per-site and network flush scopes
Advanced Redis topologies — Cluster, Sentinel, Replicated (master/replica), and the Relay/Predis clients — are available through the separate Flexa Cache Pro add-on

External services
Caching and optimization run entirely on your own server. The plugin connects to one external service, and only in the admin, for the reason below.
Deactivation feedback (Flexa Product Intelligence)
When you go to deactivate Flexa Cache on the Plugins screen, a short optional survey asks why. It is served by Flexa’s product intelligence service at https://product-intelligence.flexacommerce.com. It runs only on wp-admin/plugins.php, never on the front end, and never blocks or delays deactivation.

What is sent, and when: on opening the Plugins screen, a request to /api/v1/config (the product slug and tier) loads the survey configuration, cached for 6 hours. When you deactivate or interact with the survey, the reason you pick and any optional message you type are sent to /api/v1/deactivations, /api/v1/events, /api/v1/feedback, /api/v1/feature-requests, and /api/v1/recovery-events. If you later reactivate the plugin, a single /api/v1/recovery-events request records the reactivation and how long the plugin was inactive.
What is included: an anonymous per-site identifier (a random UUID), the plugin version and tier, and by default your WordPress/PHP version and locale. No email, site domain, user identity, or raw IP is collected.
Opt out: turn the environment data off with add_filter( 'flexa_cache/deactivation_survey/config', fn( $c ) => array( 'collect_environment' => false ) + $c );, or disable the whole survey with add_filter( 'flexa_cache/deactivation_survey/enabled', '__return_false' );.

Service terms and privacy policy: https://flexacommerce.com/pages/terms and https://flexacommerce.com/pages/privacy

延伸相關外掛

文章
Filter
Mastodon