mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Implement fact cache flushing alongside a command-line argument to invoke it.
This commit is contained in:
committed by
Michael DeHaan
parent
aa419044c4
commit
917e868f65
8
lib/ansible/cache/__init__.py
vendored
8
lib/ansible/cache/__init__.py
vendored
@@ -50,10 +50,12 @@ class FactCache(MutableMapping):
|
||||
return len(self._plugin.keys())
|
||||
|
||||
def copy(self):
|
||||
"""
|
||||
Return a primitive copy of the keys and values from the cache.
|
||||
"""
|
||||
""" Return a primitive copy of the keys and values from the cache. """
|
||||
return dict([(k, v) for (k, v) in self.iteritems()])
|
||||
|
||||
def keys(self):
|
||||
return self._plugin.keys()
|
||||
|
||||
def flush(self):
|
||||
""" Flush the fact cache of all keys. """
|
||||
self._plugin.flush()
|
||||
|
||||
Reference in New Issue
Block a user