Spec-Zone.ru › Symfony 4.0

MemcachedCache

class MemcachedCache extends AbstractCache

Свойства

MemcachedTrait
AbstractTrait
LoggerAwareTrait

Методы

hasItem($key)

{@inheritdoc}

from AbstractTrait
clear()

{@inheritdoc}

from AbstractTrait
deleteItem($key)

{@inheritdoc}

from AbstractTrait
deleteItems(array $keys)

{@inheritdoc}

from AbstractTrait
bool enableVersioning(bool $enable = true)

Включает/выключает версионирование элементов.

from AbstractTrait
reset()

{@inheritdoc}

from AbstractTrait
static handleUnserializeCallback($class) from AbstractTrait
get($key, $default = null)

{@inheritdoc}

from AbstractCache
set($key, $value, $ttl = null)

{@inheritdoc}

from AbstractCache
getMultiple($keys, $default = null)

{@inheritdoc}

from AbstractCache
setMultiple($values, $ttl = null)

{@inheritdoc}

from AbstractCache
deleteMultiple($keys)

{@inheritdoc}

from AbstractCache
static isSupported() from MemcachedTrait
static Memcached createConnection(array[]|string|string[] $servers, array $options = array())

Создаёт экземпляр Memcached.

from MemcachedTrait
__construct(Memcached $client, string $namespace = '', int $defaultLifetime)

Детали

hasItem($key)

{@inheritdoc}

Параметры

$key

clear()

{@inheritdoc}

deleteItem($key)

{@inheritdoc}

Параметры

$key

deleteItems(array $keys)

{@inheritdoc}

Параметры

array $keys

bool enableVersioning(bool $enable = true)

Включает/выключает версионирование элементов.

При включённом версионировании очистка кеша является атомарной и не требует перечисления существующих ключей для продолжения, но старые ключи могут потребовать сборки мусора и дополнительных запросов к бэкенду.

Вызов этого метода также очищает кэшированные версии пространства имён и, таким образом, вынуждает его повторную синхронизацию.

Параметры

bool $enable

Возвращаемое значение

bool предыдущее состояние версионирования

reset()

{@inheritdoc}

static handleUnserializeCallback($class)

Параметры

$class

get($key, $default = null)

{@inheritdoc}

Параметры

$key
$default

set($key, $value, $ttl = null)

{@inheritdoc}

Параметры

$key
$value
$ttl

getMultiple($keys, $default = null)

{@inheritdoc}

Параметры

$keys
$default

setMultiple($values, $ttl = null)

{@inheritdoc}

Параметры

$values
$ttl

deleteMultiple($keys)

{@inheritdoc}

Параметры

$keys

static isSupported()

static Memcached createConnection(array[]|string|string[] $servers, array $options = array())

Создаёт экземпляр Memcached.

По умолчанию включены бинарный протокол, отсутствие блокировки и совместимость с libketama.

Примеры серверов: - 'memcached://user:pass@localhost?weight=33' - array(array('localhost', 11211, 33))

Параметры

array[]|string|string[] $servers Массив серверов, DSN или массив DSN
array $options Массив опций

Возвращаемое значение

Memcached

Исключения

ErrorEception При предоставлении неверных опций или серверов

__construct(Memcached $client, string $namespace = '', int $defaultLifetime)

Параметры

Memcached $client
string $namespace
int $defaultLifetime

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Cache/Simple/MemcachedCache.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API