Sessions support
Memcached::add
Memcached
PHP Manual
La clase Memcached
Introducción
Representa una conexión a un conjunto de servidores memcached.
Clases sinopsis
Memcached
{
__construct
([
string
$persistent_id
] )
public
bool
add
(
string
$key
,
mixed
$value
[,
int
$expiration
] )
public
bool
addByKey
(
string
$server_key
,
string
$key
,
mixed
$value
[,
int
$expiration
] )
public
bool
addServer
(
string
$host
,
int
$port
[,
int
$weight
= 0
] )
public
bool
addServers
(
array
$servers
)
public
bool
append
(
string
$key
,
string
$value
)
public
bool
appendByKey
(
string
$server_key
,
string
$key
,
string
$value
)
public
bool
cas
(
float
$cas_token
,
string
$key
,
mixed
$value
[,
int
$expiration
] )
public
bool
casByKey
(
float
$cas_token
,
string
$server_key
,
string
$key
,
mixed
$value
[,
int
$expiration
] )
public
int
decrement
(
string
$key
[,
int
$offset
= 1
] )
public
bool
delete
(
string
$key
[,
int
$time
= 0
] )
public
bool
deleteByKey
(
string
$server_key
,
string
$key
[,
int
$time
= 0
] )
public
array
fetch
(
void
)
public
array
fetchAll
(
void
)
public
bool
flush
([
int
$delay
= 0
] )
public
mixed
get
(
string
$key
[,
callback
$cache_cb
[,
float
&$cas_token
]] )
public
mixed
getByKey
(
string
$server_key
,
string
$key
[,
callback
$cache_cb
[,
float
&$cas_token
]] )
public
bool
getDelayed
(
array
$keys
[,
bool
$with_cas
[,
callback
$value_cb
]] )
public
bool
getDelayedByKey
(
string
$server_key
,
array
$keys
[,
bool
$with_cas
[,
callback
$value_cb
]] )
public
mixed
getMulti
(
array
$keys
[,
array
&$cas_tokens
[,
int
$flags
]] )
public
array
getMultiByKey
(
string
$server_key
,
array
$keys
[,
string
&$cas_tokens
[,
int
$flags
]] )
public
mixed
getOption
(
int
$option
)
public
int
getResultCode
(
void
)
public
string
getResultMessage
(
void
)
public
array
getServerByKey
(
string
$server_key
)
public
array
getServerList
(
void
)
public
array
getStats
(
void
)
public
array
getVersion
(
void
)
public
int
increment
(
string
$key
[,
int
$offset
= 1
] )
public
bool
prepend
(
string
$key
,
string
$value
)
public
bool
prependByKey
(
string
$server_key
,
string
$key
,
string
$value
)
public
bool
replace
(
string
$key
,
mixed
$value
[,
int
$expiration
] )
public
bool
replaceByKey
(
string
$server_key
,
string
$key
,
mixed
$value
[,
int
$expiration
] )
public
bool
set
(
string
$key
,
mixed
$value
[,
int
$expiration
] )
public
bool
setByKey
(
string
$server_key
,
string
$key
,
mixed
$value
[,
int
$expiration
] )
public
bool
setMulti
(
array
$items
[,
int
$expiration
] )
public
bool
setMultiByKey
(
string
$server_key
,
array
$items
[,
int
$expiration
] )
public
bool
setOption
(
int
$option
,
mixed
$value
)
}
Table of Contents
Memcached::add
— Añade un nuevo ítem asociado a una nueva clave
Memcached::addByKey
— Añade un ítem asociado a una nueva clave en un servidor determinado
Memcached::addServer
— Añade un servidor al conjunto de servidores
Memcached::addServers
— Añadir múltiple servidores al grupo de servidores
Memcached::append
— Append data to an existing item
Memcached::appendByKey
— Append data to an existing item on a specific server
Memcached::cas
— Compare and swap an item
Memcached::casByKey
— Compare and swap an item on a specific server
Memcached::__construct
— Create a Memcached instance
Memcached::decrement
— Decrement numeric item's value
Memcached::delete
— Delete an item
Memcached::deleteByKey
— Delete an item from a specific server
Memcached::fetch
— Fetch the next result
Memcached::fetchAll
— Fetch all the remaining results
Memcached::flush
— Invalidate all items in the cache
Memcached::get
— Retrieve an item
Memcached::getByKey
— Retrieve an item from a specific server
Memcached::getDelayed
— Request multiple items
Memcached::getDelayedByKey
— Request multiple items from a specific server
Memcached::getMulti
— Retrieve multiple items
Memcached::getMultiByKey
— Retrieve multiple items from a specific server
Memcached::getOption
— Retrieve a Memcached option value
Memcached::getResultCode
— Return the result code of the last operation
Memcached::getResultMessage
— Return the message describing the result of the last operation
Memcached::getServerByKey
— Map a key to a server
Memcached::getServerList
— Obtiene la lista de servidores del conjunto
Memcached::getStats
— Obtiene estadísticas de un grupo de servidores
Memcached::getVersion
— Obtiene la información de la versión del grupo de servidores
Memcached::increment
— Incrementa el valor númerico del ítem
Memcached::prepend
— Prepend data to an existing item
Memcached::prependByKey
— Prepend data to an existing item on a specific server
Memcached::replace
— Reemplaza un ítem bajo una clave ya existente
Memcached::replaceByKey
— Replace the item under an existing key on a specific server
Memcached::set
— Guarda un ítem
Memcached::setByKey
— Store an item on a specific server
Memcached::setMulti
— Store multiple items
Memcached::setMultiByKey
— Guarda múltiple ítems en un servidor específico
Memcached::setOption
— Establece una opción Memcached
Sessions support
Memcached::add
Memcached
PHP Manual