內容簡介
外掛主頁 | 作者 | 付費版本 | 捐款
清除 CloudFlare 快取是一個簡單的外掛程式,利用 CloudFlare® API 在新文章發布時清除完整 HTML 頁面的快取。
此免費版本僅適用於基本用法。如果您想要完整使用,請考慮購買付費版本。
它的作用是清除首頁、文章頁面和主要 RSS 資料。這對於大多數網站都應該是有效的。但是,有一些過濾器、動作和方法可提供完整的自訂和可擴展性。
請注意,此插件會將所有前端頁面的快取時間設為 30 分鐘。這意味著,如果您使用 CloudFlare 的預設選項,它會告訴他們在該時間後重新驗證頁面快取,也就是說,在該時間後 CloudFlare 伺服器上的任何頁面的快取都會過期。
您可以使用代碼中的過濾器更改這些限制。如果您想在管理介面中使用用戶介面,請使用付費版本。
您應該建立新的 CloudFlare 頁面規則以設定適當的快取設置。這是您確保正確設置此功能的責任。
第一個頁面規則應該從快取中排除某些路徑。建議值為 wp-,這樣可以排除管理頁面和預設的 .php 頁面。例如,URL 模式:*example.com/*wp-*。此值也可以透過過濾器或付費版本的管理介面設置。
第二個頁面規則應該設置快取。您需要將「自訂快取」設置為「全部快取」。建議的「邊緣快取到期 TTL」值為默认值,即「尊重所有現有標頭」,這意味著 CloudFlare 會在 30 分鐘後進行驗證。對於「瀏覽器快取過期 TTL」,也是 30 分鐘。例如,URL 模式:*example.com/*
此插件也在GitHub上。
清除 CloudFlare 快取與 CloudFlare 無任何關聯。它僅使用 CloudFlare API 清除特定 URL 的頁面快取。
CloudFlare 是 CloudFlare, Inc. 的註冊商標。
外掛標籤
開發者團隊
原文外掛簡介
Plugin homepage | Plugin author | Premium Version | Donate
Purge Cache for CloudFlare is a simple plugin that uses CloudFlare® API to purge cache of full HTML pages when a new post is made.
This free version is only indended for basic usage. If you want to use it in full capacity, consider buying premium version.
It works by purging front page, post’s page, and main RSS feed. This should work for most sites. However, there are of filters, actions, and methods that provide full customizability and extensibility.
Note that this plugin also sets cache to 30 minutes for all frontend pages. This means that if you use default option in CloudFlare, it tells them to revalidate page cache after that time, so it means that cache for any page expires on CloudFlare servers after that time.
You can change this limits by using filters from you code. If you want user interface in your admin, use premium version.
You should create new CloudFlare page rules to set proper caching. It is your responsibility to set this properly.
First page rule should exclude certain paths from caching. Recommended value for this is wp-. This excludes admin pages and default .php pages. Example of URL pattern: *example.com/*wp-* This value can also set via filter or via admin in premium version.
Second page rule should sets caching. You need to set “Custom caching” to “Cache everything”. Recommended value for “Edge cache expire TTL” is default, “Respect all existing headers” which means that CloudFlare revalidates after 30 minutes, while for “Browser cache expire TTL” is also 30 minutes. Example of URL pattern: *example.com/*
This plugin is on GitHub too.
Purge Cache for CloudFlare is in no way affiliated with CloudFlare. It is only using CloudFlare API to purge page cache of certain URLs.
CloudFlare is registered trademark of CloudFlare, Inc.
