get($key); if ($ret === null) { $ret = false; } if ($config['debug']) { $debug['cached'][] = $config['cache']['prefix'] . $key . ($ret === false ? ' (miss)' : ' (hit)'); } return $ret; } public static function set($key, $value, $expires = false) { global $config, $debug; if (!$expires) { $expires = $config['cache']['timeout']; } self::getCache()->set($key, $value, $expires); if ($config['debug']) { $debug['cached'][] = $config['cache']['prefix'] . $key . ' (set)'; } } public static function delete($key) { global $config, $debug; self::getCache()->delete($key); if ($config['debug']) { $debug['cached'][] = $config['cache']['prefix'] . $key . ' (deleted)'; } } public static function flush() { self::getCache()->flush(); return false; } }