PHP Класс Sokil\Mongo\Cache

Наследование: implements Countable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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