[FrameworkBundle][Translation] skip warmUp when cache is not used.
This commit is contained in:
parent
0cd300f2d9
commit
efb10f641a
@ -77,6 +77,11 @@ class Translator extends BaseTranslator implements WarmableInterface
|
||||
*/
|
||||
public function warmUp($cacheDir)
|
||||
{
|
||||
// skip warmUp when translator doesn't use cache
|
||||
if (null === $this->options['cache_dir']) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->resourceLocales as $locale) {
|
||||
$this->loadCatalogue($locale);
|
||||
}
|
||||
|
Reference in New Issue
Block a user