Nette\Caching\Storages\FileStorage::getCacheFile PHP Method

getCacheFile() protected method

Returns file name.
protected getCacheFile ( $key ) : string
return string
    protected function getCacheFile($key)
    {
        $file = urlencode($key);
        if ($this->useDirs && ($a = strrpos($file, '%00'))) {
            // %00 = urlencode(Nette\Caching\Cache::NAMESPACE_SEPARATOR)
            $file = substr_replace($file, '/_', $a, 3);
        }
        return $this->dir . '/_' . $file;
    }

Usage Example

Beispiel #1
0
 /**
  * Returns file name.
  * @param  string
  * @return string
  */
 protected function getCacheFile($key)
 {
     return parent::getCacheFile(substr_replace($key, trim(strtr($this->hint, '\\/@', '.._'), '.') . '-', strpos($key, Nette\Caching\Cache::NAMESPACE_SEPARATOR) + 1, 0)) . '.php';
 }
All Usage Examples Of Nette\Caching\Storages\FileStorage::getCacheFile