Memcached クラス

(PECL memcached >= 0.1.0)

はじめに

memcached サーバー群への接続を表します。

クラス概要

class Memcached {
/* メソッド */
public function __construct(?string $persistent_id = null, ?callable $callback = null, ?string $connection_str = null)
public function add(string $key, mixed $value, int $expiration = 0): bool
public function addByKey(
    string $server_key,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public function addServer(string $host, int $port, int $weight = 0): bool
public function addServers(array $servers): bool
public function append(string $key, string $value): ?bool
public function appendByKey(string $server_key, string $key, string $value): ?bool
public function cas(
    string|int|float $cas_token,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public function casByKey(
    string|int|float $cas_token,
    string $server_key,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public function decrement(
    string $key,
    int $offset = 1,
    int $initial_value = 0,
    int $expiry = 0
): int|false
public function decrementByKey(
    string $server_key,
    string $key,
    int $offset = 1,
    int $initial_value = 0,
    int $expiry = 0
): int|false
public function delete(string $key, int $time = 0): bool
public function deleteByKey(string $server_key, string $key, int $time = 0): bool
public function deleteMulti(array $keys, int $time = 0): array
public function deleteMultiByKey(string $server_key, array $keys, int $time = 0): array
public function fetch(): array|false
public function fetchAll(): array|false
public function flush(int $delay = 0): bool
public function get(string $key, ?callable $cache_cb = null, int $get_flags = 0): mixed
public function getAllKeys(): array|false
public function getByKey(
    string $server_key,
    string $key,
    ?callable $cache_cb = null,
    int $get_flags = 0
): mixed
public function getDelayed(array $keys, bool $with_cas = false, ?callable $value_cb = null): bool
public function getDelayedByKey(
    string $server_key,
    array $keys,
    bool $with_cas = false,
    ?callable $value_cb = null
): bool
public function getMulti(array $keys, int $get_flags = 0): array|false
public function getMultiByKey(string $server_key, array $keys, int $get_flags = 0): array|false
public function getOption(int $option): mixed
public function getResultCode(): int
public function getResultMessage(): string
public function getServerByKey(string $server_key): array|false
public function getServerList(): array
public function getStats(?string $type = null): array|false
public function getVersion(): array|false
public function increment(
    string $key,
    int $offset = 1,
    int $initial_value = 0,
    int $expiry = 0
): int|false
public function incrementByKey(
    string $server_key,
    string $key,
    int $offset = 1,
    int $initial_value = 0,
    int $expiry = 0
): int|false
public function isPersistent(): bool
public function isPristine(): bool
public function prepend(string $key, string $value): ?bool
public function prependByKey(string $server_key, string $key, string $value): ?bool
public function quit(): bool
public function replace(string $key, mixed $value, int $expiration = 0): bool
public function replaceByKey(
    string $server_key,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public function resetServerList(): bool
public function set(string $key, mixed $value, int $expiration = 0): bool
public function setByKey(
    string $server_key,
    string $key,
    mixed $value,
    int $expiration = 0
): bool
public function setEncodingKey(string $key): bool
public function setMulti(array $items, int $expiration = 0): bool
public function setMultiByKey(string $server_key, array $items, int $expiration = 0): bool
public function setOption(int $option, mixed $value): bool
public function setOptions(array $options): bool
public function setSaslAuthData(string $username, string $password): bool
public function touch(string $key, int $expiration = 0): bool
public function touchByKey(string $server_key, string $key, int $expiration = 0): bool
}

目次

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top