private function makeCache()
{
if ($this->cache === self::cache_type_apc) {
$dumper = new \Roller\Dumper\PhpDumper();
$code = $dumper->dump($this->routes);
apc_store($this->cacheId, $code) === true or die('Roller\\Router: apc cache failed.');
} elseif ($this->cache === self::cache_type_file) {
$dumper = new \Roller\Dumper\PhpDumper();
$code = $dumper->dump($this->routes);
$cacheFile = $this->cacheDir . DIRECTORY_SEPARATOR . $this->cacheId;
file_put_contents($cacheFile, '<?php ' . $code) !== false or die('Roller\\Router: file cache failed.');
} else {
throw new Exception('Unknown cache type');
}
}