bolt / asset-cachebuster
📦 A Bolt 4/5 extension to bust cache for your assets
Package info
github.com/bolt/asset-cachebuster
Type:bolt-extension
pkg:composer/bolt/asset-cachebuster
0.0.2
2021-05-10 10:03 UTC
Requires
- php: >=7.1.3
- ext-mbstring: *
- twig/twig: ^2.12 | ^3.0
Requires (Dev)
- bolt/core: ^4.0.0 || ^5.0.0
- symplify/easy-coding-standard: ^6.0
This package is auto-updated.
Last update: 2026-02-10 20:43:56 UTC
README
Author: Ivo Valchev
A Bolt 4/5 extension to bust cache for your assets
What does it do?
Adds a version cachebuster to your Twig assets.
<link rel="stylesheet" href="{{ asset('styles.css') }}" />
Will output something like:
<link rel="stylesheet" href="/theme/your-theme/styles.css?v=0feef7" />
The version string is a hashed substring of your APP_SECRET.
Therefore, whenever you need bust the cache, simply run:
php bin/console bolt:reset-secret
Installation
composer require bolt/asset-cachebuster
Running PHPStan and Easy Codings Standard
First, make sure dependencies are installed:
COMPOSER_MEMORY_LIMIT=-1 composer update
And then run ECS:
vendor/bin/ecs check src