PHP Class Airship\Engine\Cache\File

Caches data in the filesystem.
Inheritance: implements CacheInterface
Afficher le fichier Open project: paragonie/airship

Protected Properties

Свойство Type Description
$baseDir string

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
getRelativePath ( string $key ) : string Get the relative path

Method Details

__construct() public méthode

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

delete() public méthode

Delete a cache entry
public delete ( string $key ) : boolean
$key string
Résultat boolean

get() public méthode

Get a cache entry
public get ( string $key ) : null | mixed
$key string
Résultat null | mixed

getRelativeHash() public static méthode

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

getRelativePath() protected méthode

Get the relative path
protected getRelativePath ( string $key ) : string
$key string
Résultat string

set() public méthode

Set a cache entry
public set ( string $key, $value ) : boolean
$key string
$value
Résultat boolean

Property Details

$baseDir protected_oe property

protected string $baseDir
Résultat string