Check if cache_warmer service is available before doing the actual cache warmup

This commit is contained in:
Miha Vrhovnik 2011-10-22 10:55:55 +02:00
parent 40fb76dd1a
commit 6b872cfa40

View File

@ -553,7 +553,7 @@ abstract class Kernel implements KernelInterface
$this->container = new $class();
$this->container->set('kernel', $this);
if (!$fresh) {
if (!$fresh && $this->container->has('cache_warmer')) {
$this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'));
}
}