Memcached 类

(PECL memcached >= 0.1.0)

介绍

表示与一组 Memcached 服务器的连接。

类概要

class Memcached {
/* 方法 */
public __construct(?string $persistent_id = null, ?callable $callback = null, ?string $connection_str = null)
public add(string $key, mixed $value, int $expiration = 0): bool
public addByKey(
    string $server_key,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public addServer(string $host, int $port, int $weight = 0): bool
public addServers(array $servers): bool
public append(string $key, string $value): ?bool
public appendByKey(string $server_key, string $key, string $value): ?bool
public cas(
    string|int|float $cas_token,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public casByKey(
    string|int|float $cas_token,
    string $server_key,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public decrement(
    string $key,
    int $offset = 1,
    int $initial_value = 0,
    int $expiry = 0
): int|false
public decrementByKey(
    string $server_key,
    string $key,
    int $offset = 1,
    int $initial_value = 0,
    int $expiry = 0
): int|false
public delete(string $key, int $time = 0): bool
public deleteByKey(string $server_key, string $key, int $time = 0): bool
public deleteMulti(array $keys, int $time = 0): array
public deleteMultiByKey(string $server_key, array $keys, int $time = 0): array
public fetch(): array|false
public fetchAll(): array|false
public flush(int $delay = 0): bool
public get(string $key, ?callable $cache_cb = null, int $get_flags = 0): mixed
public getByKey(
    string $server_key,
    string $key,
    ?callable $cache_cb = null,
    int $get_flags = 0
): mixed
public getDelayed(array $keys, bool $with_cas = false, ?callable $value_cb = null): bool
public getDelayedByKey(
    string $server_key,
    array $keys,
    布尔型 $with_cas = false,
    ?可调用 $value_cb = null
): bool
public getMulti(数组 $keys, 整型 $get_flags = 0): 数组|false
public getMultiByKey(字符串 $server_key, 数组 $keys, 整型 $get_flags = 0): 数组|false
public getOption(整型 $option): 混合
public getServerByKey(字符串 $server_key): 数组|false
public increment(
    string $key,
    int $offset = 1,
    int $initial_value = 0,
    int $expiry = 0
): int|false
public incrementByKey(
    string $server_key,
    string $key,
    int $offset = 1,
    int $initial_value = 0,
    int $expiry = 0
): int|false
public prepend(字符串 $key, 字符串 $value): ?布尔型
public prependByKey(字符串 $server_key, 字符串 $key, 字符串 $value): ?布尔型
public quit(): 布尔型
public replace(字符串 $key, 混合 $value, 整型 $expiration = 0): 布尔型
public replaceByKey(
    string $server_key,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public set(字符串 $key, 混合 $value, 整型 $expiration = 0): 布尔型
public setByKey(
    string $server_key,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public setMulti(数组 $items, 整型 $expiration = 0): 布尔型
public setMultiByKey(字符串 $server_key, 数组 $items, 整型 $expiration = 0): 布尔型
public setOption(整型 $option, 混合 $value): 布尔型
public setOptions(数组 $options): 布尔型
public setSaslAuthData(字符串 $username, 字符串 $password): 布尔型
public touch(字符串 $key, 整型 $expiration = 0): 布尔型
public touchByKey(字符串 $server_key, 字符串 $key, 整型 $expiration = 0): 布尔型
}

目录

添加备注

用户贡献笔记

此页面没有用户贡献笔记。
To Top