public function warmapCache()
{
$phpFinder = new PhpExecutableFinder();
$phpPath = $phpFinder->find();
if (!$phpPath) {
throw new \RuntimeException('The php executable could not be found, add it to your PATH environment variable and try again');
}
$php = escapeshellarg($phpPath);
$newscoopConsole = escapeshellarg($this->newscoopDir . '/application/console');
$command = new Process("{$php} {$newscoopConsole} cache:warmup", null, null, null, 300);
$command->run();
if (!$command->isSuccessful()) {
throw new \RuntimeException($command->getErrorOutput());
}
}