with new URLMapper, cached router takes more memory, time than re-generating

This commit is contained in:
Evan Prodromou 2011-09-14 12:41:54 -04:00
parent a4240db48f
commit f6f147c0db

View File

@ -69,19 +69,7 @@ class Router
function __construct() function __construct()
{ {
if (empty($this->m)) { if (empty($this->m)) {
if (!common_config('router', 'cache')) {
$this->m = $this->initialize(); $this->m = $this->initialize();
} else {
$k = self::cacheKey();
$c = Cache::instance();
$m = $c->get($k);
if (!empty($m)) {
$this->m = $m;
} else {
$this->m = $this->initialize();
$c->set($k, $this->m);
}
}
} }
} }