]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix ticket #2929: router cache now clears itself when switching singleuser mode in...
authorBrion Vibber <brion@pobox.com>
Thu, 16 Dec 2010 21:42:10 +0000 (13:42 -0800)
committerBrion Vibber <brion@pobox.com>
Thu, 16 Dec 2010 21:42:10 +0000 (13:42 -0800)
lib/router.php

index 24cda72b61f3554073c241c001a6269e7d545001..b8a9db223fa6e9b70053c8e1644741aeb1879ada 100644 (file)
@@ -160,7 +160,16 @@ class Router
     
     static function cacheKey()
     {
-        return Cache::codeKey('router');
+        $parts = array('router');
+
+        // Many router paths depend on this setting.
+        if (common_config('singleuser', 'enabled')) {
+            $parts[] = '1user';
+        } else {
+            $parts[] = 'multi';
+        }
+
+        return Cache::codeKey(implode(':', $parts));
     }
     
     function initialize()