diff --git a/platypush/plugins/inspect/__init__.py b/platypush/plugins/inspect/__init__.py index 8fafeadd84..3319ec46a6 100644 --- a/platypush/plugins/inspect/__init__.py +++ b/platypush/plugins/inspect/__init__.py @@ -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 diff --git a/platypush/plugins/inspect/_cache.py b/platypush/plugins/inspect/_cache.py index 9494e1aff3..e479b09e01 100644 --- a/platypush/plugins/inspect/_cache.py +++ b/platypush/plugins/inspect/_cache.py @@ -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]: