summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-11-30 14:46:26 -0500
committerEvan Prodromou <evan@status.net>2010-11-30 14:46:26 -0500
commit7aa201fa5285d8dfe31ab6f254bfaa9819c65285 (patch)
treed64526dee6e8713e640f9424a495a34fa8a4c39d /lib/router.php
parent0cc332eab634bc069c36e45910c5e5108c8a5410 (diff)
parentaf31767b637849f4cc904a89e30ccc81b4f4df66 (diff)
Merge branch 'master' into 0.9.x
Conflicts: lib/router.php
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/router.php b/lib/router.php
index 9640ec1e0..a0ea996ec 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -128,12 +128,13 @@ class Router
{
if (empty($this->m)) {
$k = self::cacheKey();
- $m = Cache::get($k);
+ $c = Cache::instance();
+ $m = $c->get($k);
if (!empty($m)) {
$this->m = $m;
} else {
$this->m = $this->initialize();
- Cache::set($k, $this->m);
+ $c->set($k, $this->m);
}
}
}
@@ -156,18 +157,18 @@ class Router
static function cacheKey()
{
$plugins = StatusNet::getActivePlugins();
- $names = array();
+ $names = array();
- foreach ($plugins as $plugin) {
- $names[] = $plugin[0];
- }
+ foreach ($plugins as $plugin) {
+ $names[] = $plugin[0];
+ }
- $names = array_unique($names);
- asort($names);
+ $names = array_unique($names);
+ asort($names);
- // Unique enough.
+ // Unique enough.
- $uniq = crc32(implode(',', $names));
+ $uniq = crc32(implode(',', $names));
return Cache::key('router:'.STATUSNET_VERSION.':'.$uniq);
}