You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/lib/ansible/plugins/cache
Yann Rouillard ac56230d5b Only delete key from redis in-memory cache if present (#35126)
Fixes #35120 : the redis cache plugin keeps key/value
entries in an in-memory cache to avoid hitting the
redis database each time.

The problem is that a cache entry is only set when
a value is get or set but it is always deleted when
trying to delete a value.

When the --flush-cache ansible-playbook option is used,
the redis cache plugin is first asked to remove every
entry corresponding to every hostname present in the inventory.
As no value as been set/get so far, it then tries to delete
an unexisting value from the cache and hence crashes with
a KeyError exception.

(cherry picked from commit ee3dfef016)
7 years ago
..
__init__.py Fix cache timeout behavior 8 years ago
base.py Collated PEP8 fixes (#25293) 9 years ago
jsonfile.py Do not try to import simplejson in jsonfile.py (#40983) 8 years ago
memcached.py Correct doc for cache plugin 8 years ago
memory.py Port ansible doc for plugins to use DOCUMENTATION variables 8 years ago
mongodb.py Correct doc for cache plugin 8 years ago
pickle.py Correct doc for cache plugin 8 years ago
redis.py Only delete key from redis in-memory cache if present (#35126) 7 years ago
yaml.py Correct doc for cache plugin 8 years ago