Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.6 /
site-packages /
salt /
sdb /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2022-10-11 05:09
__init__.py
29
B
-rw-r--r--
2022-05-16 09:16
cache.py
2.71
KB
-rw-r--r--
2022-05-16 09:16
confidant.py
3.69
KB
-rw-r--r--
2022-05-16 09:16
consul.py
1.68
KB
-rw-r--r--
2022-05-16 09:16
couchdb.py
2.34
KB
-rw-r--r--
2022-05-16 09:16
env.py
1.65
KB
-rw-r--r--
2022-05-16 09:16
etcd_db.py
1.95
KB
-rw-r--r--
2022-05-16 09:16
keyring_db.py
2.48
KB
-rw-r--r--
2022-05-16 09:16
memcached.py
1.61
KB
-rw-r--r--
2022-05-16 09:16
redis_sdb.py
1.72
KB
-rw-r--r--
2022-05-16 09:16
rest.py
3.25
KB
-rw-r--r--
2022-05-16 09:16
sqlite3.py
3.57
KB
-rw-r--r--
2022-05-16 09:16
tism.py
2.16
KB
-rw-r--r--
2022-05-16 09:16
vault.py
2.89
KB
-rw-r--r--
2022-05-16 09:16
yaml.py
2.53
KB
-rw-r--r--
2022-05-16 09:16
Save
Rename
""" 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 """ import salt.cache __func_alias__ = {"set_": "set"} __virtualname__ = "cache" def __virtual__(): """ Only load the module if keyring is installed """ return __virtualname__ def set_(key, value, service=None, profile=None): # pylint: disable=W0613 """ Set a key/value pair in the cache service """ key, profile = _parse_key(key, profile) cache = salt.cache.Cache(__opts__) cache.store(profile["bank"], key, value) return get(key, service, profile) def get(key, service=None, profile=None): # pylint: disable=W0613 """ Get a value from the cache service """ key, profile = _parse_key(key, profile) cache = salt.cache.Cache(__opts__) return cache.fetch(profile["bank"], key=key) def delete(key, service=None, profile=None): # pylint: disable=W0613 """ Get a value from the cache service """ key, profile = _parse_key(key, profile) cache = salt.cache.Cache(__opts__) try: cache.flush(profile["bank"], key=key) return True except Exception: # pylint: disable=broad-except return False def _parse_key(key, profile): """ Parse out a key and update the opts with any override data """ comps = key.split("?") if len(comps) > 1: for item in comps[1].split("&"): newkey, newval = item.split("=") profile[newkey] = newval if "cachedir" in profile: __opts__["cachedir"] = profile["cachedir"] return comps[0], profile