-
Notifications
You must be signed in to change notification settings - Fork 1
Standard Commands
The Lasso memcached client also supports all standard Memcached commands. These can be utilized if you'd like to work with Memcached directly.
set(key::string,value::any,expires::integer=0)::boolean set(key::string,value::any,expires::date)::boolean
Store the specified value:
memcached->set('mykey','my val)
get(key::string)::any get(keys::array,asmap::boolean=false)::map
Retrieve the specified key(s) from the server.
Returns either the value or a map containing the results if multiple keys are specified:
memcached->get('mykey')
memcached->get(array('mykey','anotherkey'))
append(key::string,value::any,expires::integer=0)::boolean
Append to value to an existing key.
memcached->append('mykey','append
prepend(key::string,value::any,expires::integer=0)::boolean
Prepend to value to an existing key.
memcached->prepend('mykey','prepend
cas(key::string,value::any,cas::integer,expires::integer=0)::boolean
Store the specified value only if it hasn't change since last retrieved. Use the cas parameter provided by gets(array,true) to make this call.
memcached->cas('mykey','new value',12345)
delete(key::string)::boolean
The command "delete" allows for explicit deletion of items
memcached->delete('mykey')
incr(key::string,value::integer=1)::integer
Increment the specified key by the value — key must exist. Returns new integer value.
memcached->incr('mykey')
decr(key::string,value::integer=1)::integer
Decrement the specified key by the value — key must exist. Returns new integer value.
memcached->decr('mykey',1)
touch(key::string,expires::integer)::boolean touch(key::string,expires::date)::boolean
Reset the expiration time on a key — key must exist. Supported by Memcached version 1.4.8 and greater. Returns boolean
memcached->touch('mykey',60)
flush::boolean flush(expires::integer)::boolean flush(expires::date)::boolean
Flush the cach of all key or keys due to expire after specific value. Returns boolean.
memcached->flush
Returns the version of the first specified server.
Returns a map contain the version of each server.