We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44afdc8 commit 6085b41Copy full SHA for 6085b41
src/Components/Twig/TwigCacheKernelWarmer.php
@@ -4,6 +4,7 @@
4
5
namespace Frosh\Tools\Components\Twig;
6
7
+use Shopware\Core\DevOps\Environment\EnvironmentHelper;
8
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
9
10
class TwigCacheKernelWarmer implements CacheWarmerInterface
@@ -18,6 +19,10 @@ public function __construct(
18
19
*/
20
public function warmUp(string $cacheDir, ?string $buildDir = null): array
21
{
22
+ if (!EnvironmentHelper::getVariable('FROSH_TOOLS_WARMUP_TWIG', false)) {
23
+ return [];
24
+ }
25
+
26
try {
27
return $this->twigCacheWarmer->warmUp($cacheDir);
28
} catch (\Throwable $e) {
0 commit comments