mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Update inventory caching to remove deprecation warnings (#53976)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user