lookyloo/lookyloo.py
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)
        cached: Dict[str, Any] = self.redis.hgetall(str(capture_dir))
        if not cached:
            self.logger.warning(f'No cache available for {capture_dir}.')
            return None
        try:
            return CaptureCache(cached)
        except LookylooException as e:
            self.logger.warning(f'Cache ({capture_dir}) is invalid ({e}): {json.dumps(cached, indent=2)}')
            return None
Get the cache from redis.
        NOTE: Doesn't try to build the pickle
Get the cache from redis.
NOTE: Doesn't try to build the pickle
Get the cache from redis . NOTE : Doesn ' t try to build the pickle
def capture_cache(self, capture_uuid: str, /) -> Optional[CaptureCache]:
        if capture_uuid in self._captures_index:
            return self._captures_index[capture_uuid]
        capture_dir = self._get_capture_dir(capture_uuid)
        cached: Dict[str, Any] = self.redis.hgetall(str(capture_dir))
        if not cached:
            self.logger.warning(f'No cache available for {capture_dir}.')
            return None
        try:
            return CaptureCache(cached)
        except LookylooException as e:
            self.logger.warning(f'Cache ({capture_dir}) is invalid ({e}): {json.dumps(cached, indent=2)}')
            return None
def capture_cache ( self , capture_uuid : str , / ) -> Optional [ CaptureCache ] : if capture_uuid in self . _captures_index : return self . _captures_index [ capture_uuid ] capture_dir = self . _get_capture_dir ( capture_uuid ) cached : Dict [ str , Any ] = self . redis . hgetall ( str ( capture_dir ) ) if not cached : self . logger . warning ( f'No cache available for {capture_dir}.' ) return None try : return CaptureCache ( cached ) except LookylooException as e : self . logger . warning ( f'Cache ({capture_dir}) is invalid ({e}): {json.dumps(cached, indent=2)}' ) return None
Get the cache from redis.
Get the cache from redis .
"""Get the cache from redis.
        NOTE: Doesn't try to build the pickle"""
self
capture_uuid
str