螺栓 / 资产缓存破坏者
📦 Bolt 4/5 扩展,用于清除你的资产缓存
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: 2024-09-10 17:23:10 UTC
README
作者:Ivo Valchev
Bolt 4/5 扩展,用于清除你的资产缓存
它做什么?
为你的 Twig 资产添加版本缓存破坏者。
<link rel="stylesheet" href="{{ asset('styles.css') }}" />
输出将类似于
<link rel="stylesheet" href="/theme/your-theme/styles.css?v=0feef7" />
版本字符串是你的 APP_SECRET
的散列子串。因此,每次你需要清除缓存时,只需运行
php bin/console bolt:reset-secret
安装
composer require bolt/asset-cachebuster
运行 PHPStan 和 Easy Codings Standard
首先,确保已安装依赖
COMPOSER_MEMORY_LIMIT=-1 composer update
然后运行 ECS
vendor/bin/ecs check src