前言介紹
- 這款 WordPress 外掛「Proxy Cache Purge」是 2011-07-14 上架。
- 目前有 40000 個安裝啟用數。
- 上一次更新是 2025-04-16,距離現在已有 18 天。
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
- 有 25 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
ipstenu | dvershinin | mikeschroder | techpriester | danielbachhuber |
外掛標籤
cache | nginx | proxy | Purge | varnish |
內容簡介
此外掛不會安裝或配置快取代理,而只是與這些服務進行介面交互。
網站常見的內容快取方式是通過反向代理快取。常見的例子是 Varnish 和 Nginx。這些系統允許網站更新內容並將訪問者的體驗快取,無需使用佔用用戶磁盤空間的複雜內容快取外掛程式。
反向代理快取安裝在服務器前面並檢查請求。如果已經緩存請求的頁面,它會提供緩存的內容。否則,它會按需生成頁面和緩存。
Proxy Cache Purge 外掛會在每次修改時發送請求以刪除(即 flush)頁面或文章的緩存數據。
工作原理
當 WordPress 更新網站上的內容時,此外掛會使用頁面的 URL 向代理快取服務發送請求,要求刪除其緩存。
並不是所有頁面都會在每次更改時從緩存中刪除。例如,當編輯文章、頁面或自定義文章類型,或新增評論時,只有以下頁面會被清除快取:
首頁
已編輯的文章/頁面
頁面關聯的任何類別、標籤和/或自定義分類法
相關的 RSS 或 Atom 訂閱
關聯的 JSON API 頁面
此外,在以下情況下將刪除整個快取:
更改佈景主題
在工具列上按下「清空快取」按鈕
外掛程式也可以鉤住刷新操作,以篩選其自己的事件以觸發刷新。
在使用子資料夾的多站點網絡上,只有網絡管理員可以刷新主站點快取。
開發者模式
如果您正在網站上進行工作,需要以兩種方式之一關閉快取:
將 define('VHP_DEVMODE', true); 添加到您的 wp-config.php 文件中
轉到 Proxy Cache -> Settings 並啟用 24 小時的調試模式
這將在頁面加載時破壞快取。不建議用於生產環境!
WP CLI
Purge
Purge 命令可讓您清空快取。
wp varnish purge – 清空首頁的快取
wp varnish purge [
您可以使用參數 --wildcard 從該 URL 下清空所有內容。因此,如果您想清除所有佈景主題的快取,您可以這樣做:
wp varnish purge https://example.com/wp-content/themes --wildcard
Debug
調試可以幫助您找出快取的功能失效的原因。默認情況下,它使用首頁,但您可以通過您網域上的任何 URL 傳遞。
wp varnish debug [
可用參數:
[--include-headers] — 在調試檢查輸出中包括標頭
[--include-grep] — 在主題和外掛目錄中搜索常見問題
DevMode
開發者模式允許您暫時禁用快取功能。
wp varnish devmode [
隱私政策
自版本 5 起,此外掛不再使用任何遠程數據。
原文外掛簡介
This plugin does not install nor configure a cache proxy. It acts as an interface with such services.
One common method of caching content for websites is via the use of reverse proxy caching. Common examples of this are Varnish and Nginx. These systems allow a website to update content and have the visitor’s experience cached without the need for complex plugins storing the files locally and using up a user’s disk space.
A reverse proxy cache is installed in front of a server and reviews requests. If the page being requested is already cached, it delivers the cached content. Otherwise it generates the page and the cache on demand.
The Proxy Cache Purge plugin sends a request to delete (aka flush) the cached data of a page or post every time it’s modified.
How It Works
When content on a site is updated by WordPress, the plugin reaches out to the proxy cache service with the URL of the page, requesting the cache be deleted.
Not all page are deleted from the cache on every change. For example, when a post, page, or custom post type is edited, or a new comment is added, only the following pages will purge:
The front page
The post/page edited
Any categories, tags, and/or custom taxonomies associated with the page
Related feeds
Associated JSON API pages
In addition, your entire cache will be deleted on the following actions:
Changing themes
Pressing the Empty Cache button on the toolbar
Plugins can hook into the purge actions as well, to filter their own events to trigger a purge.
On a multisite network using subfolders, only network admins can purge the main site.
Development Mode
If you’re working on a site and need to turn off caching in one of two ways:
Add define( 'VHP_DEVMODE', true ); to your wp-config.php file
Go to Proxy Cache -> Settings and enable debug mode for 24 hours at a time
That will break cache on page loads. It is not recommended for production!
WP CLI
Purge
Purge commands let you empty the cache.
wp varnish purge – Flush the cache for your front page
wp varnish purge [
You can use the parameter --wildcard to empty everything from that URL down. So if you wanted to empty cache for all themes, you would do this:
wp varnish purge https://example.com/wp-content/themes --wildcard
Debug
Debugging can help you figure out why your cache isn’t working as well as it could. The default is for your home page, but you can pass any URL on your domain.
wp varnish debug [
Available parameters:
[--include-headers] — Include headers in debug check output
[--include-grep] — Grep active theme and plugin directories for common issues
DevMode
Development mode allows you to disable the cache, temporarily.
wp varnish devmode [
Privacy Policy
As of version 5, this plugin no longer uses any remote data.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Proxy Cache Purge」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
5.0 | 4.4.0 | 4.5.0 | 4.6.6 | 4.7.3 | 4.8.1 | 5.0.1 | 5.0.2 | 5.0.3 | 5.1.0 | 5.1.1 | 5.1.2 | 5.1.3 | 5.2.0 | 5.2.1 | 5.2.2 | trunk |
延伸相關外掛(你可能也想知道)
Speed Optimizer – The All-In-One Performance-Boosting Plugin 》SiteGround Optimizer 插件是由 SiteGround 開發的,可以大幅提高任何托管環境下的 WordPress 網站性能。, 最初設計用於 SiteGround 的服務器,現在已經有近 ...。
Nginx Helper 》, 使用 nginx 時,從永久連結中刪除 index.php。, 在使用nginx-srcache-module創建的完整頁面快取時,添加可清除 redis-cache 的支援。, 從模組中添加對 ngin...。
Nginx Cache 》當內容更改時自動清除 Nginx 緩存 (FastCGI、Proxy、uWSGI),或在 WordPress 內手動清除。, 要求:, , Filesystem API 需要在不要求憑證的情況下運作。, Ngin...。
LWSCache 》這個外掛是由 LWS 開發的,可以幫助您在編輯頁面、文章、信息時自動管理您的 LWSCache 清除。, 它提供了一種清除所有 LWSCache 的方法。, 這個外掛僅適用於使...。
TNC Toolbox: Web Performance 》- 外掛名稱:NGINX-on-cPanel Enhancements, - 功能介紹:增強使用 NGINX-on-cPanel 時的 WordPress 體驗, - 使用對象:在 cPanel 上安裝了 NGINX 並運行 Wor...。
WP-FFPC 》警告: WP-FFPC 的開發已被暫停。, 如果您需要新功能,請將代碼和拉取請求發送到WP FFPC @ Github。, 簡短原因:我在2010年開發了這個插件來支持自己的網站。...。
Varnish/Nginx Proxy Caching 》這個外掛可以完整整合 WordPress Varnish Cache 3.x/4.x/5.x 和 Nginx Proxy Cache。, 這個外掛可以處理所有與 Varnish Cache 和 Nginx Proxy Cache 的整合,...。
Nginx Cache Controller 》此外掛提供控制 Nginx 代理伺服器快取的功能。, 安全性, , 將留言作者的資訊設定為 ajax,以防止資訊快取。, 對於需要密碼保護的文章,加入 no-cache 標頭來...。
Hestia Nginx Cache 》重要提示:Hestia 1.6.12 版修正了清除快取後網站可能會無法使用且導致 502 錯誤的問題。如果您尚未使用這個版本,請盡快升級!, WordPress 外掛 Hestia 自動...。
AJAX Hits Counter + Popular Posts Widget 》本外掛使用外部 AJAX 計數器腳本來記錄文章的瀏覽次數,是最適合快取整個頁面或使用其他快取外掛的解決方案。, 此外,外掛還包含了「熱門文章」小工具,可根...。
Cache Purge Helper 》這個外掛會在流行的 WordPress 外掛或佈景主題觸發特定的鉤子時,使用 LSCache 或 Nginx Helper 外掛清除快取。, , 如果使用 LSCache 外掛,需要 Litespeed E...。
PageSpeed Module 》此外掛稱為「PageSpeed Module」,可供Apache或Nginx模組使用。使用此外掛,您可以清除由Apache或Nginx模組建立的Cache,並啟用WordPress網站的開發模式,以...。
Cleavr Clear Cache 》管理您的 Cleavr 站點的 NGINX FastCGI 快取,只需添加清除快取觸發器鉤子,然後您就可以點擊按鈕來清除您的站點快取,並選擇性地在每次內容更改時清除快取。...。
Blizhost CloudCache Purge – Speed, Security, and Optimization 》Blizhost CloudCache Purge 在您網站內容被修改時向 Blizhost 伺服器發送請求來清除快取。這在發布、編輯、評論或刪除頁面或文章以及更改佈景主題時會發生。,...。
Cache Sniper for Nginx 》Nginx 內建了一個 FastCGI 快取,負責在網頁伺服器層處理反向代理的快取。這個 Cache Sniper for Nginx WordPress 外掛可以讓您在 WordPress 內清除此快取。...。