PHP Class Airship\Engine\Cache\File

Caches data in the filesystem.
Inheritance: implements CacheInterface
Mostrar archivo Open project: paragonie/airship

Protected Properties

Property Type Description
$baseDir string

Public Methods

Method Description
__construct ( string $baseDir ) File constructor.
delete ( string $key ) : boolean Delete a cache entry
get ( string $key ) : null | mixed Get a cache entry
getRelativeHash ( string $preHash, boolean $asString = false ) : string | array Get a relative BLAKE2b hash of an input. Formatted as two lookup directories followed by a cache entry. 'hh/hh/hhhhhhhh.
set ( string $key, $value ) : boolean Set a cache entry

Protected Methods

Method Description
getRelativePath ( string $key ) : string Get the relative path

Method Details

__construct() public method

File constructor.
public __construct ( string $baseDir )
$baseDir string The base directory

delete() public method

Delete a cache entry
public delete ( string $key ) : boolean
$key string
return boolean

get() public method

Get a cache entry
public get ( string $key ) : null | mixed
$key string
return null | mixed

getRelativeHash() public static method

..'
public static getRelativeHash ( string $preHash, boolean $asString = false ) : string | array
$preHash string The cache identifier (will be hashed)
$asString boolean Return a string?
return string | array

getRelativePath() protected method

Get the relative path
protected getRelativePath ( string $key ) : string
$key string
return string

set() public method

Set a cache entry
public set ( string $key, $value ) : boolean
$key string
$value
return boolean

Property Details

$baseDir protected_oe property

protected string $baseDir
return string