PHP 클래스 Overtrue\LaravelWechat\CacheBridge

상속: implements Doctrine\Common\Cache\Cache
파일 보기 프로젝트 열기: overtrue/laravel-wechat

공개 메소드들

메소드 설명
contains ( string $id ) : boolean Tests if an entry exists in the cache.
delete ( string $id ) : boolean Deletes a cache entry.
fetch ( string $id ) : mixed Fetches an entry from the cache.
getStats ( ) : array | null Retrieves cached information from the data store.
save ( string $id, mixed $data, integer $lifeTime ) : boolean Puts data into the cache.

메소드 상세

contains() 공개 메소드

Tests if an entry exists in the cache.
public contains ( string $id ) : boolean
$id string The cache id of the entry to check for.
리턴 boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.

delete() 공개 메소드

Deletes a cache entry.
public delete ( string $id ) : boolean
$id string The cache id.
리턴 boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. Deleting a non-existing entry is considered successful.

fetch() 공개 메소드

Fetches an entry from the cache.
public fetch ( string $id ) : mixed
$id string The id of the cache entry to fetch.
리턴 mixed The cached data or FALSE, if no cache entry exists for the given id.

getStats() 공개 메소드

Retrieves cached information from the data store.
public getStats ( ) : array | null
리턴 array | null An associative array with server's statistics if available, NULL otherwise.

save() 공개 메소드

If a cache entry with the given id already exists, its data will be replaced.
public save ( string $id, mixed $data, integer $lifeTime ) : boolean
$id string The cache id.
$data mixed The cache entry/data.
$lifeTime integer The lifetime in number of seconds for this cache entry. If zero (the default), the entry never expires (although it may be deleted from the cache to make place for other entries).
리턴 boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.