allow infinite cache age

This commit is contained in:
Antonio J. Delgado 2025-08-02 07:38:03 +03:00
parent 76e19c86e4
commit cab21448cd

View file

@ -121,7 +121,7 @@ class GetYoutubeVideos:
if (
'last_update' in cached_data and
cached_data['last_update'] + self.config['max_cache_age'] > time.time()
):
) or self.config['max_cache_age'] == -1:
cached_data = self._default_data
except json.decoder.JSONDecodeError:
cached_data = self._default_data