Skip to content

Commit 6085b41

Browse files
committed
fix: add env for warmup
1 parent 44afdc8 commit 6085b41

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Components/Twig/TwigCacheKernelWarmer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Frosh\Tools\Components\Twig;
66

7+
use Shopware\Core\DevOps\Environment\EnvironmentHelper;
78
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
89

910
class TwigCacheKernelWarmer implements CacheWarmerInterface
@@ -18,6 +19,10 @@ public function __construct(
1819
*/
1920
public function warmUp(string $cacheDir, ?string $buildDir = null): array
2021
{
22+
if (!EnvironmentHelper::getVariable('FROSH_TOOLS_WARMUP_TWIG', false)) {
23+
return [];
24+
}
25+
2126
try {
2227
return $this->twigCacheWarmer->warmUp($cacheDir);
2328
} catch (\Throwable $e) {

0 commit comments

Comments
 (0)