Module Expr Str ImportFrom alias Import alias ImportFrom alias alias ImportFrom alias TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Assign NameStore Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str FunctionDef arguments args defaults body Expr Str Return IfExp NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot BoolOpAnd NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Dict Assign NameStore Call AttributeLoad NameLoad attr Str Dict Assign NameStore Dict Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Dict orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot Call AttributeLoad Call NameLoad NameLoad attr body Raise Call NameLoad Str If NameLoad body Return Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad Str attr NameLoad NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Expr Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A 
Utilities for working with memcache

:depends:  - python-memcached

This library sets up a connection object for memcache, using the configuration
passed into the get_conn() function. Normally, this is __opts__. Optionally,
a profile or specific host and port may be passed in. If neither profile nor
host and port are provided, the defaults of '`127.0.0.`` and ``11211`` are
used. The following configurations are both valid:

.. code-block:: yaml

    # No profile name
    memcached.host: 127.0.0.1
    memcached.port: 11211

    # One or more profiles defined
    my_memcached_config:
      memcached.host: 127.0.0.1
      memcached.port: 11211

Once configured, the get_conn() function is passed a set of opts, and,
optionally, the name of a profile to be used.

.. code-block:: python

    import salt.utils.memcached_utils.py
    conn = salt.utils.memcached_utils.get_conn(__opts__,
                                              profile='my_memcached_config')

It should be noted that some usages of memcached may require a profile to be
specified, rather than top-level configurations. This being the case, it is
better to always use a named configuration profile, as shown above.
 __future__ absolute_import N/A logging salt.exceptions CommandExecutionError SaltInvocationError salt.ext.six integer_types N/A N/A N/A memcache N/A HAS_LIBS True N/A N/A N/A ImportError N/A N/A HAS_LIBS False N/A DEFAULT_HOST 127.0.0.1 N/A DEFAULT_PORT 11211 N/A DEFAULT_TIME 0 N/A DEFAULT_MIN_COMPRESS_LEN 0 N/A log N/A N/A logging getLogger __name__ N/A __func_alias__ N/A set_ set __virtual__ N/A N/A N/A N/A N/A 
    Only load if python-memcached is installed
     N/A N/A HAS_LIBS True False N/A get_conn N/A N/A opts profile host port N/A None None None N/A N/A 
    Return a conn object for accessing memcached
     N/A N/A N/A host port N/A N/A opts_pillar N/A N/A opts get pillar N/A N/A opts_master N/A N/A opts_pillar get master N/A N/A opts_merged N/A N/A N/A N/A opts_merged update opts_master N/A N/A N/A opts_merged update opts_pillar N/A N/A N/A opts_merged update opts N/A profile N/A N/A conf N/A N/A opts_merged get profile N/A N/A N/A conf opts_merged N/A host N/A N/A conf get memcached.host DEFAULT_HOST N/A port N/A N/A conf get memcached.port DEFAULT_PORT N/A N/A N/A N/A N/A str port isdigit N/A N/A N/A SaltInvocationError port must be an integer N/A HAS_LIBS N/A N/A N/A N/A memcache Client N/A N/A N/A {0}:{1} format host port N/A N/A N/A CommandExecutionError (unable to import memcache, module most likely not installed) N/A _check_stats N/A N/A conn N/A N/A N/A 
    Helper function to check the stats data passed into it, and raise an
    execption if none are returned. Otherwise, the stats are returned.
     N/A stats N/A N/A conn get_stats N/A N/A stats N/A N/A N/A CommandExecutionError memcached server is down or does not exist N/A stats N/A set_ N/A N/A conn key value time min_compress_len N/A DEFAULT_TIME DEFAULT_MIN_COMPRESS_LEN N/A N/A 
    Set a key on the memcached server, overwriting the value if it exists.
     N/A N/A N/A isinstance time integer_types N/A N/A N/A SaltInvocationError 'time' must be an integer N/A N/A N/A isinstance min_compress_len integer_types N/A N/A N/A SaltInvocationError 'min_compress_len' must be an integer N/A N/A _check_stats conn N/A N/A N/A conn set key value time min_compress_len N/A get N/A N/A conn key N/A N/A N/A 
    Retrieve value for a key
     N/A N/A _check_stats conn N/A N/A N/A conn get key N/A