/** * 读取静态缓存文件 * @param string $cachePath * @param number $expire * @return number|boolean */ public static function read($cachePath = "", $expire = 1800) { self::$cacheFile = self::getCacheFile($cachePath); //静态缓存文件存在,且没有过期,则直接读取 if (file_exists(self::$cacheFile) && time() < filemtime(self::$cacheFile) + $expire) { return readfile(self::$cacheFile); } else { ob_start(); return false; } }
private function _writeHtmlCache() { if ($this->appConfig['HTML_CACHE_ON']) { EcHtmlCache::write(); } }