From a8cce49b853c16b0e6fef717d880d092a6875f5c Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sun, 5 Nov 2017 16:27:28 +1030 Subject: [PATCH] Update asset revision whenever custom LESS is changed This should remove the need for a hard browser refresh whenever you update the custom LESS. --- framework/core/src/Asset/RevisionCompiler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/core/src/Asset/RevisionCompiler.php b/framework/core/src/Asset/RevisionCompiler.php index 3993b90a7..9911c5b11 100644 --- a/framework/core/src/Asset/RevisionCompiler.php +++ b/framework/core/src/Asset/RevisionCompiler.php @@ -81,6 +81,10 @@ class RevisionCompiler implements CompilerInterface $cacheDifferentiator[] = [$source, filemtime($source)]; } + foreach ($this->strings as $callback) { + $cacheDifferentiator[] = $callback(); + } + $current = hash('crc32b', serialize($cacheDifferentiator)); }