%PDF- %PDF-
| Direktori : /proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/salt/sdb/ |
| Current File : //proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/salt/sdb/cache.pyo |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z i d d 6Z d Z d � Z d d d � Z d d d � Z d d d
� Z
d � Z d S( 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 ( t absolute_importt print_functiont unicode_literalsNu setu set_u cachec C@ s t S( u6
Only load the module if keyring is installed
( t __virtualname__( ( ( s2 /usr/lib/python2.7/site-packages/salt/sdb/cache.pyt __virtual__; s c C@ sN t | | � \ } } t j j t � } | j | d | | � t | | | � S( u3
Set a key/value pair in the cache service
u bank( t
_parse_keyt saltt cachet Cachet __opts__t storet get( t keyt valuet servicet profileR ( ( s2 /usr/lib/python2.7/site-packages/salt/sdb/cache.pyt set_B s c C@ s>