diff --git a/salt/cache/__init__.py b/salt/cache/__init__.py index b59ba4674b..f90e8674fb 100644 --- a/salt/cache/__init__.py +++ b/salt/cache/__init__.py @@ -11,6 +11,7 @@ import time # Import Salt lobs import salt.loader +import salt.syspaths from salt.payload import Serial @@ -50,7 +51,7 @@ class Cache(object): def __init__(self, opts, cachedir=None): self.opts = opts if cachedir is None: - self.cachedir = opts['cachedir'] + self.cachedir = opts.get('cachedir', salt.syspaths.CACHE_DIR) else: self.cachedir = cachedir self.driver = opts['cache']