protected function loadCache()
{
if ($this->cached !== null) {
return;
}
$this->cached = false;
if ($this->mode == 'production') {
if (function_exists('apc_fetch')) {
$map = apc_fetch('urlMap');
} elseif (file_exists($this->cacheDir . '/urlMap.cache')) {
$map = unserialize(file_get_contents($this->cacheDir . '/urlMap.cache'));
}
if (isset($map) && is_array($map)) {
$this->map = $map;
$this->cached = true;
}
} else {
if (function_exists('apc_delete')) {
apc_delete('urlMap');
} else {
@unlink($this->cacheDir . '/urlMap.cache');
}
}
}