From e3f322e2135b6010e7c89a27122b96584acfd1a5 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Tue, 14 Feb 2012 23:36:08 +1100 Subject: optional cache prefix for multiple tinyboard instances on one machine --- inc/cache.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'inc/cache.php') diff --git a/inc/cache.php b/inc/cache.php index cc0624e4..cc3f4be0 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -17,6 +17,8 @@ public static function get($key) { global $config, $debug; + $key = $config['cache']['prefix'] . $key; + $data = false; switch($config['cache']['enabled']) { case 'memcached': @@ -45,6 +47,8 @@ public static function set($key, $value, $expires = false) { global $config; + $key = $config['cache']['prefix'] . $key; + if(!$expires) $expires = $config['cache']['timeout']; @@ -68,6 +72,8 @@ public static function delete($key) { global $config; + $key = $config['cache']['prefix'] . $key; + switch($config['cache']['enabled']) { case 'memcached': if(!self::$cache) -- cgit v1.3