summaryrefslogtreecommitdiff
path: root/inc/cache.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/cache.php')
-rw-r--r--inc/cache.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/inc/cache.php b/inc/cache.php
index 2f3c746c..d1200919 100644
--- a/inc/cache.php
+++ b/inc/cache.php
@@ -4,10 +4,7 @@
* Copyright (c) 2010-2013 Tinyboard Development Group
*/
-if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
- // You cannot request this file directly.
- exit;
-}
+defined('TINYBOARD') or exit;
class Cache {
private static $cache;
@@ -135,7 +132,7 @@ class Cache {
case 'apc':
return apc_clear_cache('user');
case 'php':
- self::$cache[$key] = array();
+ self::$cache = array();
break;
case 'redis':
if (!self::$cache)