螺栓/资产缓存破坏者

📦 Bolt 4/5 扩展,用于清除你的资产缓存

安装: 78

依赖: 0

建议者: 0

安全: 0

星级: 1

关注者: 3

分支: 0

开放问题: 0

类型:bolt-extension

0.0.2 2021-05-10 10:03 UTC

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