PHP Class Nette\Caching\Storages\FileStorage

Inheritance: extends Nette\Object, implements Nette\Caching\IStorage
Afficher le fichier Open project: nette/caching Class Usage Examples

Méthodes publiques

Свойство Type Description
$gcProbability probability that the clean() routine is started
$useDirectories boolean

Méthodes publiques

Méthode Description
__construct ( $dir, Nette\Caching\Storages\IJournal $journal = NULL )
clean ( array $conditions ) : void Removes items from the cache by conditions & garbage collector.
lock ( $key ) : void Prevents item reading and writing. Lock is released by write() or remove().
read ( $key ) : mixed | null Read from cache.
remove ( $key ) : void Removes item from the cache.
write ( $key, $data, array $dp ) : void Writes item into the cache.

Méthodes protégées

Méthode Description
getCacheFile ( $key ) : string Returns file name.
readData ( $meta ) : mixed Reads cache data from disk and closes cache file handle.
readMetaAndLock ( $file, $lock ) : array | null Reads cache data from disk.

Private Methods

Méthode Description
delete ( $file, $handle = NULL ) : void Deletes and closes file.
verify ( $meta ) : boolean Verifies dependencies.

Method Details

__construct() public méthode

public __construct ( $dir, Nette\Caching\Storages\IJournal $journal = NULL )
$journal Nette\Caching\Storages\IJournal

clean() public méthode

Removes items from the cache by conditions & garbage collector.
public clean ( array $conditions ) : void
$conditions array
Résultat void

getCacheFile() protected méthode

Returns file name.
protected getCacheFile ( $key ) : string
Résultat string

lock() public méthode

Prevents item reading and writing. Lock is released by write() or remove().
public lock ( $key ) : void
Résultat void

read() public méthode

Read from cache.
public read ( $key ) : mixed | null
Résultat mixed | null

readData() protected méthode

Reads cache data from disk and closes cache file handle.
protected readData ( $meta ) : mixed
Résultat mixed

readMetaAndLock() protected méthode

Reads cache data from disk.
protected readMetaAndLock ( $file, $lock ) : array | null
Résultat array | null

remove() public méthode

Removes item from the cache.
public remove ( $key ) : void
Résultat void

write() public méthode

Writes item into the cache.
public write ( $key, $data, array $dp ) : void
$dp array
Résultat void

Property Details

$gcProbability public_oe static_oe property

probability that the clean() routine is started
public static $gcProbability

$useDirectories public_oe static_oe property

public static bool $useDirectories
Résultat boolean