with new URLMapper, cached router takes more memory, time than re-generating
This commit is contained in:
parent
a4240db48f
commit
f6f147c0db
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user