cache Module
SaltStack
New
all
New in version 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:
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.
master_ip: sdb://mastercloudcache/public_ips
It is also possible to override both the bank
and cachedir
options
inside the SDB URI:
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:
master_ip: sdb://mastercloudcache/public_ips?bank=cloud/active/ec2/my-ec2-conf/saltmaster
salt.sdb.cache.
delete
(key, service=None, profile=None)¶Get a value from the cache service
salt.sdb.cache.
get
(key, service=None, profile=None)¶Get a value from the cache service
salt.sdb.cache.
set_
(key, value, service=None, profile=None)¶Set a key/value pair in the cache service