This commit is contained in:
@@ -75,6 +75,9 @@ class CacheManager:
|
||||
"""
|
||||
If channels.json has changed, clear all caches and return True.
|
||||
Otherwise return False.
|
||||
Only clear when we have a stored hash that explicitly differs; when
|
||||
stored is None (hash file missing), do not delete cache files — they
|
||||
may be valid and we don't want to destroy them on every restart.
|
||||
"""
|
||||
current = get_channels_hash(self._channels_file)
|
||||
stored = self._get_stored_hash()
|
||||
@@ -82,7 +85,7 @@ class CacheManager:
|
||||
if current is None:
|
||||
return False
|
||||
|
||||
if stored != current:
|
||||
if stored is not None and stored != current:
|
||||
logger.info("Channels changed (hash %s -> %s), invalidating cache", stored, current)
|
||||
self._clear_cache()
|
||||
if self._schedule_builder and hasattr(self._schedule_builder, "invalidate_cache"):
|
||||
|
||||
Reference in New Issue
Block a user