22.16.110. salt.modules.memcached

22.16.110.1. Module for Management of Memcached Keys

New in version 2014.1.0.

salt.modules.memcached.add(key, value, host='127.0.0.1', port=11211, time=0, min_compress_len=0)

Add a key to the memcached server, but only if it does not exist. Returns False if the key already exists.

CLI Example:

salt '*' memcached.add <key> <value>
salt.modules.memcached.decrement(key, delta=1, host='127.0.0.1', port=11211)

Decrement the value of a key

CLI Example:

salt '*' memcached.decrement <key>
salt '*' memcached.decrement <key> 2
salt.modules.memcached.delete(key, host='127.0.0.1', port=11211, time=0)

Delete a key from memcache server

CLI Example:

salt '*' memcached.delete <key>
salt.modules.memcached.get(key, host='127.0.0.1', port=11211)

Retrieve value for a key

CLI Example:

salt '*' memcached.get <key>
salt.modules.memcached.increment(key, delta=1, host='127.0.0.1', port=11211)

Increment the value of a key

CLI Example:

salt '*' memcached.increment <key>
salt '*' memcached.increment <key> 2
salt.modules.memcached.replace(key, value, host='127.0.0.1', port=11211, time=0, min_compress_len=0)

Replace a key on the memcached server. This only succeeds if the key already exists. This is the opposite of memcached.add

CLI Example:

salt '*' memcached.replace <key> <value>
salt.modules.memcached.set_(key, value, host='127.0.0.1', port=11211, time=0, min_compress_len=0)

Set a key on the memcached server, overwriting the value if it exists.

CLI Example:

salt '*' memcached.set <key> <value>
salt.modules.memcached.status(host='127.0.0.1', port=11211)

Get memcached status

CLI Example:

salt '*' memcached.status

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Table Of Contents

Previous topic

22.16.109. salt.modules.mdadm

Next topic

22.16.111. salt.modules.mine

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.