fix: Proper call to local cache

pull/197/head
Raphaël Vinot 2021-04-03 02:24:38 +02:00
parent 82db729e96
commit e492428bf5
1 changed files with 2 additions and 2 deletions

View File

@ -511,9 +511,9 @@ class Lookyloo():
def capture_cache(self, capture_uuid: str) -> Optional[CaptureCache]:
"""Get the cache from redis.
NOTE: Doesn't try to build the pickle"""
if capture_uuid in self._captures_index:
return self._captures_index[capture_uuid]
capture_dir = self._get_capture_dir(capture_uuid)
if capture_dir in self._captures_index:
return self._captures_index[capture_dir]
cached: Dict[str, Any] = self.redis.hgetall(str(capture_dir))
if not cached:
self.logger.warning(f'No cache available for {capture_dir}.')