PHP 클래스 Webiny\Component\Rest\Compiler\CacheDrivers\ArrayDriver

상속: implements Webiny\Component\Rest\Compiler\CacheDrivers\CacheDriverInterface
파일 보기 프로젝트 열기: Webiny/Framework

보호된 프로퍼티들

프로퍼티 타입 설명
$cache Internal array that holds the compiled cache.

공개 메소드들

메소드 설명
delete ( $api, $class ) Delete the cache for the given api and class.
isFresh ( $api, $class, $version, $ttl ) : boolean Checks if the cache is still fresh based on the given ttl.
read ( $api, $class, $version ) : boolean | array Read the compiled cache array.
save ( $api, $class, $version, $cacheArray ) Save the compiled cache array.

메소드 상세

delete() 공개 메소드

Delete the cache for the given api and class.
public delete ( $api, $class )
$api Name of the API.
$class Name of the class.

isFresh() 공개 메소드

Checks if the cache is still fresh based on the given ttl.
public isFresh ( $api, $class, $version, $ttl ) : boolean
$api Name of the API.
$class Name of the class.
$version Version of the class.
$ttl Unix timestamp against which the cache ttl should be compared.
리턴 boolean Returns true if cache is till fresh, otherwise false.

read() 공개 메소드

Read the compiled cache array.
public read ( $api, $class, $version ) : boolean | array
$api Name of the API.
$class Name of the class.
$version Version of the class.
리턴 boolean | array Returns the compiled cache array, or false if cache is not found.

save() 공개 메소드

Save the compiled cache array.
public save ( $api, $class, $version, $cacheArray )
$api Name of the API.
$class Name of the class.
$version Version of the class.
$cacheArray The compiled class cache array.

프로퍼티 상세

$cache 보호되어 있는 프로퍼티

Internal array that holds the compiled cache.
protected $cache