Debug file list cache

This commit is contained in:
Daniel A. Wozniak 2018-10-16 22:23:10 -07:00
parent 9f5722a71d
commit a24d8b8c83
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61
2 changed files with 3 additions and 4 deletions

View file

@ -141,9 +141,9 @@ def check_file_list_cache(opts, form, list_cache, w_lock):
if age < opts.get('fileserver_list_cache_time', 20):
# Young enough! Load this sucker up!
with salt.utils.files.fopen(list_cache, 'rb') as fp_:
log.trace(
'Returning file_lists cache data from %s',
list_cache
log.debug(
"Returning file list from cache: age=%s cache_time=%s %s",
age, opts.get('fileserver_list_cache_time', 20), list_cache
)
return salt.utils.data.decode(serial.load(fp_).get(form, [])), False, False
elif _lock_cache(w_lock):

View file

@ -310,7 +310,6 @@ def _file_lists(load, form):
__opts__, form, list_cache, w_lock
)
if cache_match is not None:
log.debug("Returning file list from cache: %s", list_cache)
return cache_match
if refresh_cache:
ret = {