2015-07-09 02:33:34 +00:00
|
|
|
======================
|
2014-09-03 22:36:00 +00:00
|
|
|
Managing the Job Cache
|
2015-07-09 02:33:34 +00:00
|
|
|
======================
|
2014-09-03 21:36:48 +00:00
|
|
|
|
|
|
|
The Salt Master maintains a job cache of all job executions which can be
|
2015-07-09 02:33:34 +00:00
|
|
|
queried via the jobs runner. This job cache is called the Default Job Cache.
|
2014-09-03 21:36:48 +00:00
|
|
|
|
2015-03-31 19:59:11 +00:00
|
|
|
.. _default_job_cache:
|
|
|
|
|
2014-09-03 21:36:48 +00:00
|
|
|
Default Job Cache
|
|
|
|
=================
|
|
|
|
|
|
|
|
A number of options are available when configuring the job cache. The default
|
|
|
|
caching system uses local storage on the Salt Master and can be found in the
|
|
|
|
job cache directory (on Linux systems this is typically
|
2015-07-09 02:33:34 +00:00
|
|
|
``/var/cache/salt/master/jobs``). The default caching system is suitable for most
|
2014-09-03 22:36:00 +00:00
|
|
|
deployments as it does not typically require any further configuration or
|
2014-09-03 21:36:48 +00:00
|
|
|
management.
|
|
|
|
|
|
|
|
The default job cache is a temporary cache and jobs will be stored for 24
|
|
|
|
hours. If the default cache needs to store jobs for a different period the
|
2014-09-03 22:36:00 +00:00
|
|
|
time can be easily adjusted by changing the `keep_jobs` parameter in the
|
2014-09-03 21:36:48 +00:00
|
|
|
Salt Master configuration file. The value passed in is measured via hours:
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
keep_jobs: 24
|
|
|
|
|
2015-07-09 02:33:34 +00:00
|
|
|
Additional Job Cache Options
|
|
|
|
============================
|
2014-09-03 21:36:48 +00:00
|
|
|
|
|
|
|
Many deployments may wish to use an external database to maintain a long term
|
2014-09-03 22:36:00 +00:00
|
|
|
register of executed jobs. Salt comes with two main mechanisms to do this, the
|
2015-07-09 02:33:34 +00:00
|
|
|
master job cache and the external job cache.
|
2014-09-03 21:36:48 +00:00
|
|
|
|
2015-07-09 02:33:34 +00:00
|
|
|
See :ref:`Storing Job Results in an External System <external-master-cache>`.
|
2015-03-31 19:59:11 +00:00
|
|
|
|
2014-09-03 21:36:48 +00:00
|
|
|
|