diff options
author | Brion Vibber <brion@pobox.com> | 2010-12-16 13:42:10 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-12-16 13:42:10 -0800 |
commit | ed24c95ac28bce8cd30c94c03f93b28dc26d2d96 (patch) | |
tree | 57c7d1cfb834dce390126dab1e8cbca205d21c0e | |
parent | ba2b670bfb6235f8f73a1c37f5318b6cbb820048 (diff) |
Fix ticket #2929: router cache now clears itself when switching singleuser mode in and out
-rw-r--r-- | lib/router.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/router.php b/lib/router.php index 24cda72b6..b8a9db223 100644 --- a/lib/router.php +++ b/lib/router.php @@ -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() |