PHPackages                             idearia/wordpress-cache-busting - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. idearia/wordpress-cache-busting

ActiveLibrary[Caching](/categories/caching)

idearia/wordpress-cache-busting
===============================

Selectively invalidate browser cache in WordPress

1.2(3y ago)01.6k↓50%GPL-3.0-or-laterPHPPHP ^7.0|^8.0

Since Jul 21Pushed 3y ago3 watchersCompare

[ Source](https://github.com/Idearia/wordpress-cache-busting)[ Packagist](https://packagist.org/packages/idearia/wordpress-cache-busting)[ Docs](https://github.com/Idearia/wordpress-cache-busting)[ RSS](/packages/idearia-wordpress-cache-busting/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

WordPress Cache Busting
=======================

[](#wordpress-cache-busting)

Invalidate the browser cache of CSS e JS files loaded via wp\_enqueue\_script and wp\_enqueue\_style.

The cache can be invalidated in one of two ways;

- statically, specifying a fixed value for the `ver` query parameter,
- dynamically, setting 'ver' with the timestamp of the last file change (uses `filemtime()`).

You need to choose the desired way at the asset level configuring the $this-&gt;assets array in the main class.

Inspired by

\# Install

With Composer v2 or higher:

```
composer require idearia/wordpress-cache-busting

```

If you do not want to use Composer, just include the src/CacheBuster.php file.

Example
=======

[](#example)

```
class CacheBuster extends \Idearia\WordPressCacheBusting\CacheBuster
{
	protected $assets = [
		/**
		 * Example of dynamic cache invalidation
		 */
		[
			'handle' => 'some-script-or-css',
			'path'   => 'wp-content/plugins/some-plugin/script.js',
		],
		/**
		 * Example of static cache invalidation
		 */
		[
			'handle' => 'some-other-script-or-css',
			'ver'    => '1.2.3',
		],
	];
}

new CacheBuster;
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~333 days

Total

3

Last Release

1096d ago

PHP version history (2 changes)1.0PHP ^7.0

1.2PHP ^7.0|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17342951?v=4)[Idearia SRL](/maintainers/idearia)[@Idearia](https://github.com/Idearia)

---

Top Contributors

[![HighLiuk](https://avatars.githubusercontent.com/u/65017775?v=4)](https://github.com/HighLiuk "HighLiuk (1 commits)")

---

Tags

wordpresscachewp

### Embed Badge

![Health badge](/badges/idearia-wordpress-cache-busting/health.svg)

```
[![Health](https://phpackages.com/badges/idearia-wordpress-cache-busting/health.svg)](https://phpackages.com/packages/idearia-wordpress-cache-busting)
```

###  Alternatives

[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23517.0k1](/packages/rtcamp-nginx-helper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
