PHP 클래스 Sokil\Mongo\Cache

상속: implements Countable
파일 보기 프로젝트 열기: sokil/php-mongo 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Database $database, $collectionName )
clear ( )
count ( )
delete ( $key )
deleteMatchingAllTags ( array $tags ) Delete documents by tag Document deletes if it contains all passed tags
deleteMatchingAnyTag ( array $tags ) Delete documents by tag Document deletes if it contains any of passed tags
deleteMatchingNoneOfTags ( array $tags ) Delete documents by tag Document deletes if it not contains all passed tags
deleteMatchingTag ( $tag ) Delete documents by tag
deleteNotMatchingAnyTag ( array $tags ) Delete documents by tag Document deletes if it contains any of passed tags
deleteNotMatchingTag ( $tag ) Delete documents by tag
get ( $key ) : array | null Get value by key
has ( $key )
init ( )
set ( integer | string $key, mixed $value, integer $ttl, array $tags = null ) Set with expiration in seconds
setDueDate ( integer | string $key, mixed $value, integer $timestamp, array $tags = null ) Set with expiration on concrete date
setNeverExpired ( integer | string $key, mixed $value, array $tags = null ) : Cache Set key that never expired

메소드 상세

__construct() 공개 메소드

public __construct ( Database $database, $collectionName )
$database Database

clear() 공개 메소드

public clear ( )

count() 공개 메소드

public count ( )

delete() 공개 메소드

public delete ( $key )

deleteMatchingAllTags() 공개 메소드

Delete documents by tag Document deletes if it contains all passed tags
public deleteMatchingAllTags ( array $tags )
$tags array

deleteMatchingAnyTag() 공개 메소드

Delete documents by tag Document deletes if it contains any of passed tags
public deleteMatchingAnyTag ( array $tags )
$tags array

deleteMatchingNoneOfTags() 공개 메소드

Delete documents by tag Document deletes if it not contains all passed tags
public deleteMatchingNoneOfTags ( array $tags )
$tags array

deleteMatchingTag() 공개 메소드

Delete documents by tag
public deleteMatchingTag ( $tag )

deleteNotMatchingAnyTag() 공개 메소드

Delete documents by tag Document deletes if it contains any of passed tags
public deleteNotMatchingAnyTag ( array $tags )
$tags array

deleteNotMatchingTag() 공개 메소드

Delete documents by tag
public deleteNotMatchingTag ( $tag )

get() 공개 메소드

Get value by key
public get ( $key ) : array | null
$key
리턴 array | null

has() 공개 메소드

public has ( $key )

init() 공개 메소드

public init ( )

set() 공개 메소드

Set with expiration in seconds
public set ( integer | string $key, mixed $value, integer $ttl, array $tags = null )
$key integer | string
$value mixed
$ttl integer
$tags array

setDueDate() 공개 메소드

Set with expiration on concrete date
public setDueDate ( integer | string $key, mixed $value, integer $timestamp, array $tags = null )
$key integer | string
$value mixed
$timestamp integer
$tags array

setNeverExpired() 공개 메소드

Set key that never expired
public setNeverExpired ( integer | string $key, mixed $value, array $tags = null ) : Cache
$key integer | string
$value mixed
$tags array
리턴 Cache