10000 [FrameworkBundle][Translation] skip warmUp when cache is not used. · symfony/symfony@b0a49e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit b0a49e3

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

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/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)
0