PHP 클래스 Nette\Caching\Storages\FileStorage

상속: extends Nette\Object, implements Nette\Caching\IStorage
파일 보기 프로젝트 열기: nette/caching 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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