|
|
|
|
|
MemcachedIncrement (Function) In french: MemcachedIncrémente Increments the value associated with a key. MemcachedIncrement(memConnection, "counter", 1, 0, 1 min)
Syntax
<Result> = MemcachedIncrement(<Connection> , <Key> [, <Increment> [, <Initial value> [, <Expiration>]]])
<Result>: Integer Previous key value. <Connection>: memcachedConnection variable Name of the memcachedConnection variable that corresponds to the connection to Memcached. <Key>: Character string Key to use. <Increment>: Optional integer Increment value (1 by default). <Initial value>: Optional integer Initial key value if the sought key does not exist. Indeed, the sought key is automatically created if it does not exist and its value is set to <Initial Value>. WARNING: to use this parameter, the Memcached server must use the binary communication protocol (the Property ProtocolBinary property of the memcachedConnection type variable must correspond to True). An error is returned if this parameter is not specified. <Expiration>: Integer or optional duration Duration during which the key is stored in the cache. This duration is expressed in seconds. This duration can correspond to: - an integer corresponding to the number of seconds,
- a Duration variable.
- the duration in a readable format (e.g., '10s').
This duration is set to 0 by default. In this case, the duration is unlimited: if no more memory is available, the oldest keys are deleted.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|