# salt.modules.memcached

Module for Management of Memcached Keys

Added 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.decr(key, delta=1, host='127.0.0.1', port=11211)

  This function is an alias of `decrement`.

  Decrement the value of a key

  CLI Example:

      salt '*' memcached.decrement <key>
      salt '*' memcached.decrement <key> 2

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.incr(key, delta=1, host='127.0.0.1', port=11211)

  This function is an alias of `increment`.

  Increment the value of a key

  CLI Example:

      salt '*' memcached.increment <key>
      salt '*' memcached.increment <key> 2

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