PHP Class Bluz\Cache\Adapter\FileBase

Author: murzik
Inheritance: extends AbstractAdapter
Show file Open project: bluzphp/framework

Protected Properties

Property Type Description
$cacheDir directory of cache files
$extension extension of cache files

Public Methods

Method Description
__construct ( array $settings = [] ) Check configuration and permissions

Protected Methods

Method Description
doDelete ( string $id ) : boolean | mixed
doFlush ( ) : boolean Flush implementation for all file-based cache implementations
getFilename ( string $id ) : string Generate path to cache file based on cache entry id
writeFile ( string $fileName, string $content ) : boolean | integer Write string to the file in an atomic way

Method Details

__construct() public method

Check configuration and permissions
public __construct ( array $settings = [] )
$settings array

doDelete() protected method

protected doDelete ( string $id ) : boolean | mixed
$id string
return boolean | mixed

doFlush() protected method

Flush implementation for all file-based cache implementations
protected doFlush ( ) : boolean
return boolean

getFilename() protected method

Generate path to cache file based on cache entry id
protected getFilename ( string $id ) : string
$id string cache entry id
return string path to file

writeFile() protected method

Write string to the file in an atomic way
protected writeFile ( string $fileName, string $content ) : boolean | integer
$fileName string
$content string
return boolean | integer The number of bytes that were written to the file, or false on failure

Property Details

$cacheDir protected property

directory of cache files
protected $cacheDir

$extension protected property

extension of cache files
protected $extension