[WordPress] 外掛分享: Super Light Cache Buster

首頁外掛目錄 › Super Light Cache Buster
700+
安裝啟用
★★★★★
5/5 分(9 則評價)
150 天前
最後更新
問題解決
WordPress 5.0+ PHP 5.3+ v1.4.2 上架:2020-06-23

內容簡介

開發者做出的變更似乎無法顯示嗎?或者你厭倦了網站煩人的緩存?使用這個外掛來打破緩存!

這個簡單的外掛程式壓縮後少於21KB,並且會將隨機版本號碼添加到CSS和JS檔案上,以防止頁面和瀏覽器緩存干擾你的體驗。

你可以在不使用它的時候完全從設定頁面禁用此外掛,或在網站開發期間啟用它😀。

回饋

我很樂意聽取你的建議和回饋 - 感謝你使用或嘗試我開發的外掛!
在Twitter上@mwale_and_sons與我聯繫
關注我的LinkedIn頁面
或者到我的網站上訪問我。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Can’t see the changes supposedly made by your developer? Or maybe you’re just tired of your site’s annoying cache? Use this plugin to cache a break!
With a compressed size of under 30KB, this simple plugin adds random version numbers to CSS & JS assets to prevent browser caching getting in the way of your happiness.
Super Light Cache Buster also prevents page caching by using Cache-Control directives.
You can completely disable the plugin from the settings page when you are not using it or keep it enabled if the site is under development. 😀
Available Hooks
Cache Buster is becoming more developer friendly. Below you can find the plugin’s first hooks and details about them.
slcb_allow_in_backend

Filters whether Cache Buster should run (randomize asset version numbers) in the back end.

Return true to enable Cache Buster. false is the default.
slcb_version_name

Filters the version name for assets to allow using a custom version name (or number).

Return the version name e.g. you can use the value 2.0.1.
When this filter is in use, version numbers will not be randomized. Instead, you will have to change the version name manually to rename assets.
This filter overrides the “Version Name” setting in the dashboard.
The provided version name must be a valid query parameter. As a safety, if the provided string breaks any URLs, it will not be used.

Feedback

I am open for your suggestions and feedback – Thank you for using or trying out one of my plugins!
Drop me a line @mwale_and_sons on Twitter
Follow me on my LinkedIn page
Or visit me at my website.

Do I have to clear my cache for the plugin to work?
Yes, you should clear your cache(s)! This plugin doesn’t clear pages that have already been cached (coming soon, shhh).
If you are still being served cached pages after activating the plugin, clear the cache at least once.
This will delete all pages/posts from the cache, and Cache Buster will prevent them from being cached again while the plugin is enabled :-).
Does this plugin work on Multisite?
No, Cache Buster hasn’t been tested on Multisite Networks.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon