diff options
author | Evan Prodromou <evan@status.net> | 2010-12-06 17:19:41 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-12-06 17:21:01 -0500 |
commit | 49757c79ee732cce179fe5f2d542dc93005943b5 (patch) | |
tree | ff60566d7971ed944f473ff651c9a9685325ee25 /lib/router.php | |
parent | a33d1d6090557772465fbc401afb123a44f3925d (diff) |
Config flag to disable router caching if needed
Diffstat (limited to 'lib/router.php')
-rw-r--r-- | lib/router.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/router.php b/lib/router.php index 8d2fbf6cd..fb33125ab 100644 --- a/lib/router.php +++ b/lib/router.php @@ -127,15 +127,19 @@ class Router function __construct() { if (empty($this->m)) { - $k = self::cacheKey(); - $c = Cache::instance(); - $m = $c->get($k); - if (!empty($m)) { - $this->m = $m; - } else { + if (!common_config('router', 'cache')) { $this->m = $this->initialize(); - $c->set($k, $this->m); - } + } 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); + } + } } } |