/** * Get cache-filename. * * @param string $prefix * @param string $path * @param array $params * @return string */ private static function getCacheFilename($prefix, $path, $params) { $code = str_replace('/', '.', $path); if (substr($code, 0, 1) == '.') { $code = substr($code, 1); } if (substr($code, -1) == '.') { $code = substr($code, 0, -1); } if (count($params) > 0) { $code .= '.' . md5(serialize($params)); } $filename = $prefix . '.' . $code . '.json'; $filename = Config::getCachePath() . '/' . $filename; return $filename; }