/** * @param bool $ifEcho 是否直接输出 * @return string null */ public function getCache($ifEcho = self::INDIRECT_ECHO_CACHE) { $file = ""; $cacheInfoFile = new FileLoader("{$this->cachePath}{$this->cacheId}/{$this->cacheDigest}.tmp", array("mode" => "read")); if ($cacheInfoFile->isReadable()) { $file = $cacheInfoFile->getFileString(); $cacheInfoFile->close(); } else { trigger_error("缓存文件无法读取:{$this->cachePath}{$this->cacheId}/{$this->cacheDigest}.tmp", E_USER_WARNING); } if ($ifEcho) { echo $file; return null; } else { return $file; } }