Skip to content

Commit a4de4cc

Browse files
committed
[FrameworkBundle][Translation] skip warmUp when cache is not used.
1 parent cd443fb commit a4de4cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Translation/Translator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ public function __construct(ContainerInterface $container, MessageSelector $sele
7777
*/
7878
public function warmUp($cacheDir)
7979
{
80+
// skip warmUp when translator doesn't use cache
81+
if (null === $this->options['cache_dir']) {
82+
return;
83+
}
84+
8085
foreach ($this->resourceLocales as $locale) {
8186
$this->loadCatalogue($locale);
8287
}

0 commit comments

Comments
 (0)