[FrameworkBundle][Translation] skip warmUp when cache is not used.

This commit is contained in:
Abdellatif Ait boudad 2015-04-24 09:52:20 +01:00
parent 0cd300f2d9
commit efb10f641a

View File

@ -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);
}