跳到内容

WeAmp Cache Control for ModPageSpeed

v0.1.1

oschaaf · 2026年6月18日 上架

Full-page caching control panel for the ModPageSpeed server module: cache headers, purge-on-publish, per-post-type TTLs.

正在使用
10 以下
评分
暂无
累计下载
361
最近更新
2026年11月14日
需要 WordPress 6.0+已测试到 7.1.5PHP 8.1+

贡献者

截图

Settings page: live server status, deployment prerequisites, and cache controls.
Settings page: live server status, deployment prerequisites, and cache controls.
Setup wizard: six guided steps from server detection to a verified purge.
Setup wizard: six guided steps from server detection to a verified purge.
Automatic server detection and connection test against the admin API.
Automatic server detection and connection test against the admin API.
The wizard hands you the exact nginx cookie-bypass snippet your deployment needs.
The wizard hands you the exact nginx cookie-bypass snippet your deployment needs.
Final wizard check: a live test purge proves the invalidation path end to end.
Final wizard check: a live test purge proves the invalidation path end to end.

This plugin is the control panel for ModPageSpeed — a web server optimization module for nginx and Apache. ModPageSpeed must be installed and running on your server for this plugin to function. It is not a standalone caching plugin.

The plugin does three things:

  1. Enables full-page caching — adds Cache-Control: public, max-age=N to anonymous page responses (WordPress does not send this by default), with explicit bypasses for logged-in users, WooCommerce cart/checkout/account pages, search, feeds, and 404s.
  2. Keeps the cache fresh — calls the ModPageSpeed purge API when you publish, update, or delete content, when comments change, when stock levels change, and when terms or theme settings change.
  3. Gives you control in WP Admin and WP-CLI — per-post-type TTLs, cookie bypass list, excluded URL patterns, a first-run setup wizard, and wp pagespeed flush|status|test-connection commands.

Works with both mod_pagespeed deployments (auto-detected), with one important difference:

  • The mod_pagespeed optimizer worker (the Docker / nginx reverse proxy) caches full HTML pages itself — the plugin’s headers and purge calls drive its page cache directly.
  • The mod_pagespeed module (the native web-server module for Apache, nginx, and IIS) does not cache HTML (it is a streaming rewriter; its in-place optimization caches only images, CSS, and JS). Full-page caching with the module requires an external cache layer in front (nginx proxy_cache, Varnish, or a CDN) plus ModifyCachingHeaders off or DownstreamCachePurgeLocationPrefix — with the module’s default ModifyCachingHeaders on, it replaces this plugin’s Cache-Control header on rewritten HTML. With the module, the plugin’s purge calls evict optimized sub-resources and metadata, not HTML pages.

Server requirements

  • The mod_pagespeed module (v1.15.0+r3 or later) or the mod_pagespeed optimizer worker (v2.0.0 or later) installed on your web server.
  • For the optimizer worker: its management API enabled (--api-port).
  • For the module: an admin handler with EnableCachePurge on.
  • For full logged-in-user correctness an nginx cookie-bypass map block is required — the setup wizard provides a copy-paste snippet and verifies it.

WP-CLI

  • wp pagespeed flush [--url=<url>] — purge the home page (and posts page), or one specific URL on this site.
  • wp pagespeed status — detected product, version, license tier, purge prerequisites, and last-purge status.
  • wp pagespeed test-connection — verify the admin API is reachable and correctly configured (read-only, never purges).

License

This plugin is free software, licensed under the GNU General Public License v2.0 or later. The full GPL-2.0 license text is bundled with the plugin in the LICENSE file.

Third Party Services

This plugin makes HTTP requests to the operator-configured ModPageSpeed admin API URL. Data sent includes page URLs (for cache purging) and an API key (for authentication). No data is sent to We-Amp or any third party.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums