]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
was using Cache::get() and ::set() wrong
authorEvan Prodromou <evan@status.net>
Tue, 30 Nov 2010 19:44:16 +0000 (14:44 -0500)
committerEvan Prodromou <evan@status.net>
Tue, 30 Nov 2010 19:44:16 +0000 (14:44 -0500)
lib/router.php

index 1cd66ca79d0f7aed8115a9b5c06ad59639759cc5..7272a96904ba786d81977b1b49c9a3c88b4582df 100644 (file)
@@ -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);
     }