Update inventory caching to remove deprecation warnings (#53976)

This commit is contained in:
Sloane Hertel
2019-03-26 08:15:12 -05:00
committed by GitHub
parent 1a5732807f
commit a93154c57f
6 changed files with 19 additions and 14 deletions

View File

@@ -244,7 +244,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
update_cache = False
if cache:
try:
source_data = self.cache.get(cache_key)
source_data = self._cache[cache_key]
except KeyError:
update_cache = True
@@ -274,4 +274,4 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
cacheable_results = self._populate_from_source(source_data, using_current_cache)
if update_cache:
self.cache.set(cache_key, cacheable_results)
self._cache[cache_key] = cacheable_results