allow infinite cache age
This commit is contained in:
parent
76e19c86e4
commit
cab21448cd
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ class GetYoutubeVideos:
|
||||||
if (
|
if (
|
||||||
'last_update' in cached_data and
|
'last_update' in cached_data and
|
||||||
cached_data['last_update'] + self.config['max_cache_age'] > time.time()
|
cached_data['last_update'] + self.config['max_cache_age'] > time.time()
|
||||||
):
|
) or self.config['max_cache_age'] == -1:
|
||||||
cached_data = self._default_data
|
cached_data = self._default_data
|
||||||
except json.decoder.JSONDecodeError:
|
except json.decoder.JSONDecodeError:
|
||||||
cached_data = self._default_data
|
cached_data = self._default_data
|
||||||
|
|
Loading…
Reference in a new issue