PHPackages                             absolute/magento2-cache-bust - 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. absolute/magento2-cache-bust

AbandonedArchivedMagento2-module[Caching](/categories/caching)

absolute/magento2-cache-bust
============================

Absolute Commerce Cache Bust extension for Magento 2

3.1.2(7y ago)1876.7k↑133.3%3[1 PRs](https://github.com/AbsoluteCommerce/Magento2-CacheBust/pulls)proprietaryPHP

Since Nov 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/AbsoluteCommerce/Magento2-CacheBust)[ Packagist](https://packagist.org/packages/absolute/magento2-cache-bust)[ RSS](/packages/absolute-magento2-cache-bust/feed)WikiDiscussions master Synced 1mo ago

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

Absolute Cache Bust
===================

[](#absolute-cache-bust)

With Absolute Cache Bust for Magento 2 you can ensure your customers are viewing the latest version of your images, CSS and JavaScript files. This extension can be used with or without a CDN, and will also bust local versions of assets in your customers web browser cache. Find more information at .

Version Compatibility
=====================

[](#version-compatibility)

- For Magento 2.2.x and later please use version 3.x.x of this extension.
- For earlier Magento versions, please use version 2.x.x of this extension.

Installation
============

[](#installation)

The best way to add the extension is via composer.

```
composer require absolute/magento2-cache-bust

```

Once the extension has been added, update Magento 2 in the normal fashion.

```
php bin/magento setup:upgrade

```

Web Server Configuration
========================

[](#web-server-configuration)

Some web server configuration is required in order for requests to `yoursite.com/static/version12345/some/asset.js` to resolve correctly. The intention is for the web server to ignore the segment `/version12345/` and process the request as if it were not there.

Add the following to the appropriate location in your web server configuration.

Nginx
-----

[](#nginx)

For the static cache busting, Magento already has the following in the recommended nginx configuration:

```
location /static/ {
    ...

    location ~ ^/static/version {
        rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
    }

    ...

```

For the media cache busting, add the following to your nginx configuration:

```
location /media/ {
   ...

   location ~ ^/media/version {
       rewrite ^/media/(version\d*/)?(.*)$ /media/$2 last;
   }

   ...
}

```

Apache
------

[](#apache)

For the static cache busting, Magento already has the following configuration in `pub/static/.htaccess`:

```

    RewriteEngine On

    # Remove signature of the static files that is used to overcome the browser cache
    RewriteRule ^version.+?/(.+)$ $1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l

    RewriteRule .* ../static.php?resource=$0 [L]

```

For the media cache busting, update `pub/media/.htaccess` with the following:

```

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## Absolute Cache Bust
    RewriteRule ^version.+?/(.+)$ $1 [L]

############################################
## never rewrite for existing files
    RewriteCond %{REQUEST_FILENAME} !-f

############################################
## rewrite everything else to index.php

    RewriteRule .* ../get.php [L]

```

CORS
====

[](#cors)

Since Magento 2.2.x you will also need to configure your web server to allow CORS requests through, otherwise you may see errors like:

- ... OPTIONS ... 405 ()
- Uncaught SyntaxError: Unexpected end of JSON input
- Response for preflight has invalid HTTP status code 405
- Request header field x-requested-with is not allowed
- No 'Access-Control-Allow-Origin' header is present
- Access has been blocked by CORS policy

You can find out more about the required configuration here:

Usage
=====

[](#usage)

Once installed and configured, there are various ways to bust your Magento 2 websites cached assets.

Admin Panel Buttons
-------------------

[](#admin-panel-buttons)

In the Magento Admin Panel go to `System > Cache Management` and you will see a new section at the bottom called `Cache Busting`. Clicking these buttons will update the dynamic element `/version12345/` with a new value and then flush the appropriate Magento caches, so on their next visit your customers will download the assets afresh.

Command Line Interface (CLI)
----------------------------

[](#command-line-interface-cli)

In the Magento CLI tool you will see some new commands available, which can be used to automatically bust your cache during a deployment for example.

```
./bin/magento absolute:cache-bust:all
./bin/magento absolute:cache-bust:static
./bin/magento absolute:cache-bust:media

```

Help / Support
==============

[](#help--support)

Need help or custom development? Find us at . For terms and conditions and license information, please visit .

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~70 days

Recently: every ~139 days

Total

11

Last Release

2754d ago

Major Versions

1.0.0 → 2.0.02017-02-17

2.3.3 → 3.0.02017-11-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/45655d7178a665a6087c26f80c59c6c6868b7539cb80254b2ed855040c22ea2d?d=identicon)[absolute](/maintainers/absolute)

---

Top Contributors

[![josephmcdermott](https://avatars.githubusercontent.com/u/6955944?v=4)](https://github.com/josephmcdermott "josephmcdermott (32 commits)")[![chris-pook](https://avatars.githubusercontent.com/u/4628660?v=4)](https://github.com/chris-pook "chris-pook (4 commits)")

### Embed Badge

![Health badge](/badges/absolute-magento2-cache-bust/health.svg)

```
[![Health](https://phpackages.com/badges/absolute-magento2-cache-bust/health.svg)](https://phpackages.com/packages/absolute-magento2-cache-bust)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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