(PECL memcached >= 2.0.0)
Memcached::incrementByKey — Incrementa un valor numérico de un elemento almacenado en un servidor específico
$server_key
,$key
,$offset
= 1,$initial_value
= 0,$expiry
= 0
Memcached::incrementByKey() incrementa un valor numérico
de un elemento especificando el incremento mediante el argumento offset
.
Si el valor del elemento no es numérico, se emitirá un error.
Memcached::incrementByKey() establecerá el elemento al valor
del argumento initial_value
si la clave no existe.
server_key
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
key
La clave del elemento a incrementar.
offset
El incremento a utilizar sobre el valor del elemento.
initial_value
El valor a establecer si el elemento no existe.
expiry
El tiempo de expiración para la definición del elemento.
Devuelve el nuevo valor del elemento en caso de éxito o false
si ocurre un error.