Title: Super Light Cache Buster
Author: Mwale Kalenga
Published: <strong>2020 年 6 月 24 日</strong>
Last modified: 2025 年 10 月 19 日

---

搜索插件

![](https://s.w.org/plugins/geopattern-icon/super-light-cache-buster.svg)

# Super Light Cache Buster

 作者：[Mwale Kalenga](https://profiles.wordpress.org/mwalek/)

[下载](https://downloads.wordpress.org/plugin/super-light-cache-buster.1.4.2.zip)

 * [详情](https://cn.wordpress.org/plugins/super-light-cache-buster/#description)
 * [评价](https://cn.wordpress.org/plugins/super-light-cache-buster/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/super-light-cache-buster/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/super-light-cache-buster/#developers)

 [支持](https://wordpress.org/support/plugin/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](https://twitter.com/mwale_and_sons) on Twitter
 * Follow me on [my LinkedIn page](https://www.linkedin.com/in/mwale-kalenga)
 * Or visit me at [my website](https://mwale.me/).

### 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.

## 安装

 1. Upload the entire `super-light-cache-buster` folder to the `/wp-content/plugins/`
    directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Clear all caches on your site and server (hosting).
 4. Cache a break from caching :-).

## 评价

![](https://secure.gravatar.com/avatar/bc248f07aded6aecc5c40cd06ea1cabce5a4fc651a8fc9bc099573200d840d61?
s=60&d=retro&r=g)

### 󠀁[One of the best plugins used so far](https://wordpress.org/support/topic/one-of-the-best-plugins-used-so-far/)󠁿

 [VannDigital](https://profiles.wordpress.org/vdn-staff/) 2025 年 3 月 28 日 1 回复

We recently switched to WP Compress and the cache would stay stale even after content
updates. This plugin helped change that!!!

![](https://secure.gravatar.com/avatar/04271e77c20e360f2c5c18f9e99744a0ae40b8ecaee9bc3bf8162f7669fcfb72?
s=60&d=retro&r=g)

### 󠀁[Nice](https://wordpress.org/support/topic/nice-4794/)󠁿

 [Mark3121](https://profiles.wordpress.org/mark3121/) 2024 年 6 月 20 日 1 回复

My litespeed cache has been driving me up the wall with browser cache not updating,
this solved it

![](https://secure.gravatar.com/avatar/f8b4ee5d50b3f92239be29f4e9f53cb50f1715dcc4b2449449ebb29934d364bf?
s=60&d=retro&r=g)

### 󠀁[Lightweight and excellent support](https://wordpress.org/support/topic/lightweight-and-excellent-support/)󠁿

 [David Jensen](https://profiles.wordpress.org/dkjensen/) 2024 年 3 月 18 日 1 回复

Very useful plugin for development

![](https://secure.gravatar.com/avatar/28ed9a68ef19b15e3eabc3905a965bd0c1d138ee3606ab201ad68fbf919961d1?
s=60&d=retro&r=g)

### 󠀁[Very good plugin](https://wordpress.org/support/topic/very-good-plugin-2808/)󠁿

 [deffo](https://profiles.wordpress.org/restodo/) 2024 年 3 月 3 日 1 回复

Simple and works great. Thanks for this plugin.

![](https://secure.gravatar.com/avatar/6a4dfd9f0556878dcc109f69524a355d41c865dabb0ac2b23aa3472cbc2bb983?
s=60&d=retro&r=g)

### 󠀁[You saved my life! :‎)](https://wordpress.org/support/topic/you-saved-my-life-7/)󠁿

 [Saif](https://profiles.wordpress.org/babylon1999/) 2023 年 12 月 23 日 1 回复

EZ 5 starts!

![](https://secure.gravatar.com/avatar/00c17b22f5d8876e78f6f8efc935495d58ad8bd5b115d73ec0d5f61213c87953?
s=60&d=retro&r=g)

### 󠀁[Perfect solution](https://wordpress.org/support/topic/perfect-solution-260/)󠁿

 [scmsteve](https://profiles.wordpress.org/scmsteve/) 2023 年 10 月 18 日 1 回复

Especially after the update to allow a custom version string, either through a GUI
setting or programmatic hook, this plugin fixes a persistent problem when doing 
site updates. Too often we have browsers holding onto cached CSS/etc after doing
an update. We want them cached, but wanted a way to invalidate those when changes
are made. This now allows us to use the version as a “point in time” refresh point.
Caching will happen until we tell it a new version is installed. It works perfect
for us. Thanks so much to Mwale for sharing this freely!

 [ 阅读所有9条评价 ](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/)

## 贡献者及开发者

「Super Light Cache Buster」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Mwale Kalenga ](https://profiles.wordpress.org/mwalek/)

「Super Light Cache Buster」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/super-light-cache-buster/contributors)
为本插件所做的贡献。

[帮助将「Super Light Cache Buster」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/super-light-cache-buster)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/super-light-cache-buster/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/super-light-cache-buster/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/super-light-cache-buster/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/super-light-cache-buster/)。

## 更新日志

#### 1.4.2

Release Date – October 19, 2025

**Fixed**

 * Removed WordPress 6.7 text domain compatibility warning.

#### 1.4.1

Release Date – March 18, 2024

**Fixed**

 * Resolved PHP 8.2 deprecation warnings.

#### 1.4.0

Release Date – October 17, 2023

**Added**

 * Introduce the “Version Name” setting to allow using a custom version name instead
   of a random one.
 * Apply a filter to the Version Name setting to allow overriding it.

**Enhanced**

 * Improve code architecture.
 * Add a link to SLCB settings next to the plugin description on the plugins screen.

#### 1.3.0

Release Date – June 3, 2023

**Added**

 * Introduce a button to refresh the page without caching.
 * Apply a filter to determine whether Cache Buster runs in the wp-admin area.

#### 1.2.0

Release Date – November 13, 2022

**Added**

 * Introduce Internationalization (Make Cache Buster translatable).
 * Introduce a notice to clear the cache when settings are saved.

**Fixed**

 * Patch XSS vulnerability.
 * Patch File-Handling vulnerability.

**Enhanced**

 * Improve inline code documentation.
 * Improve WordPress Coding Standards conformance.

#### 1.1.2

Release Date – September 29, 2022

**Fixed**

 * Fix warning/error thrown when Cache Buster is uninstalled.

**Enhanced**

 * Use a static method when register_uninstall_hook is invoked.

#### 1.1.1

Release Date – May 06, 2022

**Enhanced**

 * Don’t randomize asset version numbers in the admin area.
 * Hide Cache Buster’s status from non-admins.

#### 1.1.0

Release Date – April 25, 2022

**Added**

 * Introduce plugin settings to enable/disable cache prevention and control its 
   intensity.
 * Introduce a menu item to show Cache Buster’s status in the admin bar.
 * Introduce `Cache-Control` directives.

**Enhanced**

 * Delete database options when Cache Buster is uninstalled.
 * Improve overall code efficiency.

#### 1.0.0

Release Date – June 24, 2020

 * Initial release

## 额外信息

 *  版本 **1.4.2**
 *  最后更新：**8 月前**
 *  活跃安装数量 **700+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **6.8.5**
 *  PHP 版本 ** 5.3 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/super-light-cache-buster/) 和 [German](https://de.wordpress.org/plugins/super-light-cache-buster/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/super-light-cache-buster)
 * 标签
 * [buster](https://cn.wordpress.org/plugins/tags/buster/)[cache](https://cn.wordpress.org/plugins/tags/cache/)
   [cachebuster](https://cn.wordpress.org/plugins/tags/cachebuster/)[clear](https://cn.wordpress.org/plugins/tags/clear/)
   [prevent](https://cn.wordpress.org/plugins/tags/prevent/)
 *  [高级视图](https://cn.wordpress.org/plugins/super-light-cache-buster/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  9 条 5 星评价     ](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/super-light-cache-buster/reviews/)

## 贡献者

 *   [ Mwale Kalenga ](https://profiles.wordpress.org/mwalek/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/super-light-cache-buster/)