/** * The top part of the caching system */ public static function startBuffer() { //naming issues here, pls fix file naming issues self::$script = new DFile(str_replace(array('?', '/', ','), '_', self::$config['cacheFolder'] . self::$config['cachePrefix'] . DRequest::SERVER('REQUEST_URI') . '.cache')); if (self::$script->exists()) { if (self::$script->lastModifiedTime() > time() - self::$config['cacheThreshold']) { include_once self::$script->handle; exit; } } ob_start('ob_gzhandler'); }