PHP 인터페이스 Prado\Caching\ICache

This interface must be implemented by cache managers.
부터: 3.0
저자: Qiang Xue ([email protected])
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
add ( $id, $value, $expire, $dependency = null ) : boolean Stores a value identified by a key into cache if the cache does not contain this key.
delete ( $id ) : boolean Deletes a value with the specified key from cache
flush ( ) Deletes all values from cache.
get ( $id ) : mixed Retrieves a value from cache with a specified key.
set ( $id, $value, $expire, $dependency = null ) : boolean Stores a value identified by a key into cache.

메소드 상세

add() 공개 메소드

Nothing will be done if the cache already contains the key.
public add ( $id, $value, $expire, $dependency = null ) : boolean
리턴 boolean true if the value is successfully stored into cache, false otherwise

delete() 공개 메소드

Deletes a value with the specified key from cache
public delete ( $id ) : boolean
리턴 boolean if no error happens during deletion

flush() 공개 메소드

Be careful of performing this operation if the cache is shared by multiple applications.
public flush ( )

get() 공개 메소드

Retrieves a value from cache with a specified key.
public get ( $id ) : mixed
리턴 mixed the value stored in cache, false if the value is not in the cache or expired.

set() 공개 메소드

If the cache already contains such a key, the existing value and expiration time will be replaced with the new ones.
public set ( $id, $value, $expire, $dependency = null ) : boolean
리턴 boolean true if the value is successfully stored into cache, false otherwise