Skip to content

A Bolt 4/5 extension to bust cache for your assets

License

Notifications You must be signed in to change notification settings

bolt/asset-cachebuster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bolt Asset Cachebuster Extension

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

About

A Bolt 4/5 extension to bust cache for your assets

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages