PHP 클래스 yii\caching\DummyCache

DummyCache does not cache anything. It is provided so that one can always configure a 'cache' application component and save the check of existence of \Yii::$app->cache. By replacing DummyCache with some other cache component, one can quickly switch from non-caching mode to caching mode. For more details and usage information on Cache, see the guide article on caching.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends Cache
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

보호된 메소드들

메소드 설명
addValue ( string $key, mixed $value, integer $duration ) : boolean Stores a value identified by a key into cache if the cache does not contain this key.
deleteValue ( string $key ) : boolean Deletes a value with the specified key from cache This is the implementation of the method declared in the parent class.
flushValues ( ) : boolean Deletes all values from cache.
getValue ( string $key ) : mixed | false Retrieves a value from cache with a specified key.
setValue ( string $key, mixed $value, integer $duration ) : boolean Stores a value identified by a key in cache.

메소드 상세

addValue() 보호된 메소드

This is the implementation of the method declared in the parent class.
protected addValue ( string $key, mixed $value, integer $duration ) : boolean
$key string the key identifying the value to be cached
$value mixed the value to be cached
$duration integer the number of seconds in which the cached value will expire. 0 means never expire.
리턴 boolean true if the value is successfully stored into cache, false otherwise

deleteValue() 보호된 메소드

Deletes a value with the specified key from cache This is the implementation of the method declared in the parent class.
protected deleteValue ( string $key ) : boolean
$key string the key of the value to be deleted
리턴 boolean if no error happens during deletion

flushValues() 보호된 메소드

This is the implementation of the method declared in the parent class.
protected flushValues ( ) : boolean
리턴 boolean whether the flush operation was successful.

getValue() 보호된 메소드

This is the implementation of the method declared in the parent class.
protected getValue ( string $key ) : mixed | false
$key string a unique key identifying the cached value
리턴 mixed | false the value stored in cache, false if the value is not in the cache or expired.

setValue() 보호된 메소드

This is the implementation of the method declared in the parent class.
protected setValue ( string $key, mixed $value, integer $duration ) : boolean
$key string the key identifying the value to be cached
$value mixed the value to be cached
$duration integer the number of seconds in which the cached value will expire. 0 means never expire.
리턴 boolean true if the value is successfully stored into cache, false otherwise