PHP 클래스 Webiny\Component\Cache\Bridge\Memory\Couchbase

상속: extends Jamm\Memory\CouchbaseObject, implements Webiny\Component\Cache\Bridge\CacheStorageInterface
파일 보기 프로젝트 열기: Webiny/Framework

공개 메소드들

메소드 설명
__construct ( Couchbase $couchbase ) Constructor.
acquireKey ( string $key, &$autoUnlocker ) : boolean Try to lock key, and if key is already locked - wait, until key will be unlocked.
delete ( string | array $key ) : boolean | array Delete key or array of keys from storage.
deleteByTags ( array | string $tag ) : boolean Delete keys by tags.
deleteOld ( ) : boolean Delete expired cache values.
lockKey ( mixed $key, mixed &$autoUnlockerVariable ) : boolean Get exclusive mutex for key. Key will be still accessible to read and write, but another process can exclude dog-pile effect, if before updating the key he will try to get this mutex.
selectByCallback ( callable $callback, boolean $getArray = false ) : mixed Select from storage via callback function.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Couchbase $couchbase )
$couchbase Couchbase

acquireKey() 공개 메소드

Time of waiting is defined in max_wait_unlock constant of MemoryObject class.
public acquireKey ( string $key, &$autoUnlocker ) : boolean
$key string Name of the cache key.
$autoUnlocker
리턴 boolean

delete() 공개 메소드

Delete key or array of keys from storage.
public delete ( string | array $key ) : boolean | array
$key string | array Key, or array of keys, you wish to delete.
리턴 boolean | array If array of keys was passed, on error will be returned array of not deleted keys, or true on success.

deleteByTags() 공개 메소드

Delete keys by tags.
public deleteByTags ( array | string $tag ) : boolean
$tag array | string Tag, or an array of tags, for which you wish to delete the cache.
리턴 boolean

deleteOld() 공개 메소드

Delete expired cache values.
public deleteOld ( ) : boolean
리턴 boolean

lockKey() 공개 메소드

Get exclusive mutex for key. Key will be still accessible to read and write, but another process can exclude dog-pile effect, if before updating the key he will try to get this mutex.
public lockKey ( mixed $key, mixed &$autoUnlockerVariable ) : boolean
$key mixed Name of the cache key.
$autoUnlockerVariable mixed Pass empty, just declared variable
리턴 boolean

selectByCallback() 공개 메소드

Only values of array type will be selected.
public selectByCallback ( callable $callback, boolean $getArray = false ) : mixed
$callback callable ($value_array,$key)
$getArray boolean
리턴 mixed