protected getFilename ( string $id ) : string | ||
$id | string | cache entry id |
return | string | path to file |
protected function getFilename($id)
{
// make uid as hash from id
// split it by 4 chars for make directory structure
$path = join(DIRECTORY_SEPARATOR, str_split(md5($id), 4));
$path = $this->cacheDir . DIRECTORY_SEPARATOR . $path;
return $path . $this->extension;
}