mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Re-add cache clearing call to Inventory init
This prevents a bug where the existing cache outside of the class is not cleared when creating a new Inventory object. This only really affects people using the API directly right now, but wanted to fix it to prevent weird errors from popping up.
This commit is contained in:
parent
c2ac1507ea
commit
365c5b23ce
1 changed files with 4 additions and 0 deletions
|
@ -78,6 +78,10 @@ class Inventory(object):
|
|||
self._restriction = None
|
||||
self._subset = None
|
||||
|
||||
# clear the cache here, which is only useful if more than
|
||||
# one Inventory objects are created when using the API directly
|
||||
self.clear_pattern_cache()
|
||||
|
||||
self.parse_inventory(host_list)
|
||||
|
||||
def serialize(self):
|
||||
|
|
Loading…
Reference in a new issue