PHP Класс Nette\Caching\Storages\FileStorage

Наследование: extends Nette\Object, implements Nette\Caching\IStorage
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$gcProbability probability that the clean() routine is started
$useDirectories boolean

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
delete ( $file, $handle = NULL ) : void Deletes and closes file.
verify ( $meta ) : boolean Verifies dependencies.

Описание методов

__construct() публичный Метод

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

clean() публичный Метод

Removes items from the cache by conditions & garbage collector.
public clean ( array $conditions ) : void
$conditions array
Результат void

getCacheFile() защищенный Метод

Returns file name.
protected getCacheFile ( $key ) : string
Результат string

lock() публичный Метод

Prevents item reading and writing. Lock is released by write() or remove().
public lock ( $key ) : void
Результат void

read() публичный Метод

Read from cache.
public read ( $key ) : mixed | null
Результат mixed | null

readData() защищенный Метод

Reads cache data from disk and closes cache file handle.
protected readData ( $meta ) : mixed
Результат mixed

readMetaAndLock() защищенный Метод

Reads cache data from disk.
protected readMetaAndLock ( $file, $lock ) : array | null
Результат array | null

remove() публичный Метод

Removes item from the cache.
public remove ( $key ) : void
Результат void

write() публичный Метод

Writes item into the cache.
public write ( $key, $data, array $dp ) : void
$dp array
Результат void

Описание свойств

$gcProbability публичное статическое свойство

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

$useDirectories публичное статическое свойство

public static bool $useDirectories
Результат boolean