fixed caches (#30667)

This commit is contained in:
Brian Coca 2017-10-19 14:23:22 -04:00 committed by GitHub
parent 0b8e38d022
commit 2ffe3c42bb
7 changed files with 27 additions and 22 deletions

View file

@ -151,9 +151,9 @@ class InventoryModule(BaseInventoryPlugin):
self._config_data = {}
source_data = None
if cache and cache_key in inventory.cache:
if cache and cache_key in self._cache:
try:
source_data = inventory.cache[cache_key]
source_data = self._cache[cache_key]
except KeyError:
pass
@ -189,7 +189,7 @@ class InventoryModule(BaseInventoryPlugin):
source_data = cloud_inventory.list_hosts(
expand=expand_hostvars, fail_on_cloud_config=fail_on_errors)
inventory.cache[cache_key] = source_data
self._cache[cache_key] = source_data
self._populate_from_source(source_data)