src/cache/File.php
protected function cache_file($key)
    {
        $key = sha1($key);

        if ($this->directory_level > 0) {
            $base = $this->path;
            for ($i = 0; $i < $this->directory_level; ++$i) {
                if (($prefix = substr($key, $i + $i, 2)) !== false) {
                    $base .= DIRECTORY_SEPARATOR . $prefix;
                }
            }
            return $base . DIRECTORY_SEPARATOR . $key;
        }
        return $this->path . DIRECTORY_SEPARATOR . $key;
    }
protected function cache_file($key)
    {
        $key = sha1($key);

        if ($this->directory_level > 0) {
            $base = $this->path;
            for ($i = 0; $i < $this->directory_level; ++$i) {
                if (($prefix = substr($key, $i + $i, 2)) !== false) {
                    $base .= DIRECTORY_SEPARATOR . $prefix;
                }
            }
            return $base . DIRECTORY_SEPARATOR . $key;
        }
        return $this->path . DIRECTORY_SEPARATOR . $key;
    }
Returns the cache file path given the cache key.
@param string $key cache key
@return string the cache file path