Cache.php
public function getCacheFile($filename, $actual = false, $mkdir = false)
    {
        $path = array();

        // Getting the length of the filename before the extension
        $parts = explode('.', $filename);
        $len = strlen($parts[0]);

        for ($i=0; $i<min($len, $this->prefixSize); $i++) {
            $path[] = $filename[$i];

        }
        $path = implode('/', $path);

        if ($mkdir) {
            $actualDir = $this->getActualCacheDirectory() . '/' . $path;
            $this->mkdir($actualDir);
        }

        $path .= '/' . $filename;

        if ($actual) {
            return $this->getActualCacheDirectory() . '/' . $path;
        } else {
            return $this->getCacheDirectory() . '/' . $path;
        }
    }
public function getCacheFile($filename, $actual = false, $mkdir = false)
    {
        $path = array();

        // Getting the length of the filename before the extension
        $parts = explode('.', $filename);
        $len = strlen($parts[0]);

        for ($i=0; $i<min($len, $this->prefixSize); $i++) {
            $path[] = $filename[$i];

        }
        $path = implode('/', $path);

        if ($mkdir) {
            $actualDir = $this->getActualCacheDirectory() . '/' . $path;
            $this->mkdir($actualDir);
        }

        $path .= '/' . $filename;

        if ($actual) {
            return $this->getActualCacheDirectory() . '/' . $path;
        } else {
            return $this->getCacheDirectory() . '/' . $path;
        }
    }
Gets the cache file name

@param string $filename the name of the cache file
@param bool $actual get the actual file or the public file
@param bool $mkdir a boolean to enable/disable the construction of the
cache file directory
@return string