forked from platypush/platypush
[CI/CD] Better logic to detect changes in the components cache.
This commit is contained in:
parent
e73872b65e
commit
11e25a79a5
2 changed files with 5 additions and 1 deletions
|
@ -105,6 +105,8 @@ class InspectPlugin(Plugin):
|
|||
self.logger.info('Saving new components cache to %s', self.cache_file)
|
||||
self._cache.dump(self.cache_file)
|
||||
self._cache.loaded_at = self._cache.saved_at
|
||||
else:
|
||||
self.logger.info('No changes detected in the components cache')
|
||||
|
||||
return self._cache
|
||||
|
||||
|
|
|
@ -221,8 +221,10 @@ class Cache:
|
|||
:param obj_type: Object type.
|
||||
:param value: Value to set.
|
||||
"""
|
||||
old_value = self.get(category, obj_type)
|
||||
self._cache[category][obj_type] = value
|
||||
self.has_changes = True
|
||||
if old_value != value:
|
||||
self.has_changes = True
|
||||
|
||||
@property
|
||||
def plugins(self) -> Dict[type, dict]:
|
||||
|
|
Loading…
Reference in a new issue