mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 06:11:26 -07:00
Update inventory caching to remove deprecation warnings (#53976)
This commit is contained in:
parent
1a5732807f
commit
a93154c57f
6 changed files with 19 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue