PHP Conference Japan 2024

Memcached 類別

(PECL memcached >= 0.1.0)

簡介

表示與一組 memcached 伺服器的連線。

類別概要

類別 Memcached {
/* 方法 */
公開 __construct(?字串 $persistent_id = null, ?可呼叫 $callback = null, ?字串 $connection_str = null)
公開方法 add(字串 $key, 混合型別 $value, 整數 $expiration = 0): 布林值
公開方法 addByKey(
    字串 $server_key,
    字串 $key,
    混合型別 $value,
    整數 $expiration = 0
): 布林值
公開方法 addServer(字串 $host, 整數 $port, 整數 $weight = 0): 布林值
公開方法 addServers(陣列 $servers): 布林值
公開方法 append(字串 $key, 字串 $value): ?布林值
公開方法 appendByKey(字串 $server_key, 字串 $key, 字串 $value): ?布林值
公開方法 cas(
    (字串|整數|浮點數) $cas_token,
    字串 $key,
    混合型別 $value,
    整數 $expiration = 0
): 布林值
公開方法 casByKey(
    (字串|整數|浮點數) $cas_token,
    字串 $server_key,
    字串 $key,
    混合型別 $value,
    整數 $expiration = 0
): 布林值
公開方法 decrement(
    字串 $key,
    整數 $offset = 1,
    整數型 (int) $initial_value = 0,
    整數型 (int) $expiry = 0
): 整數型 (int) 或 布林值假 (false)
公開 (public) decrementByKey(
    字串 $server_key,
    字串 $key,
    整數 $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)
公開 get(字串 $key, ?可呼叫 $cache_cb = null, 整數 $get_flags = 0): 混合
公開 getByKey(
    字串 $server_key,
    字串 $key,
    ?可呼叫 $cache_cb = null,
    整數 $get_flags = 0
): 混合
公開 getDelayed(陣列 $keys, 布林 $with_cas = false, ?可呼叫 $value_cb = null): 布林
公開 getDelayedByKey(
    字串 $server_key,
    陣列 $keys,
    布林 $with_cas = false,
    ?可呼叫 $value_cb = null
): 布林值
公開 getMulti(陣列 $keys, 整數 $get_flags = 0): 陣列|false
公開 getMultiByKey(字串 $server_key, 陣列 $keys, 整數 $get_flags = 0): 陣列|false
公開 getOption(整數 $option): 混合
公開 getServerByKey(字串 $server_key): 陣列|false
公開 getStats(?字串 $type = null): 陣列|false
公開 increment(
    字串 $key,
    整數 $offset = 1,
    整數型 (int) $initial_value = 0,
    整數型 (int) $expiry = 0
): 整數型 (int) 或 布林值假 (false)
公開 incrementByKey(
    字串 $server_key,
    字串 $key,
    整數 $offset = 1,
    整數型 (int) $initial_value = 0,
    整數型 (int) $expiry = 0
): 整數型 (int) 或 布林值假 (false)
公開 prepend(字串 $key, 字串 $value): ?布林值
公開 prependByKey(字串 $server_key, 字串 $key, 字串 $value): ?布林值
公開 quit(): 布林值
公開 replace(字串 $key, 混合 $value, 整數 $expiration = 0): 布林
公開 replaceByKey(
    字串 $server_key,
    字串 $key,
    混合型別 $value,
    整數 $expiration = 0
): 布林值
公開 set(字串 $key, 混合 $value, 整數 $expiration = 0): 布林
公開 setByKey(
    字串 $server_key,
    字串 $key,
    混合型別 $value,
    整數 $expiration = 0
): 布林值
公開 setMulti(陣列 $items, 整數 $expiration = 0): 布林
公開 setMultiByKey(字串 $server_key, 陣列 $items, 整數 $expiration = 0): 布林
公開 setOption(整數 $option, 混合 $value): 布林
公開 setOptions(陣列 $options): 布林
公開 setSaslAuthData(字串 $username, 字串 $password): 布林
公開 touch(字串 $key, 整數 $expiration = 0): 布林
公開 touchByKey(字串 $server_key, 字串 $key, 整數 $expiration = 0): 布林值
}

目錄

新增筆記

使用者貢獻的筆記

此頁面沒有使用者貢獻的筆記。
To Top