mirror of https://github.com/CIRCL/lookyloo
fix: do not initialize the redis cache more than once.
parent
9ef9fef655
commit
6b10e74470
|
@ -68,8 +68,9 @@ class Lookyloo():
|
|||
cache = {'uuid': uuid, 'title': title}
|
||||
if (report_dir / 'no_index').exists(): # If the folders claims anonymity
|
||||
cache['no_index'] = 1
|
||||
self.redis.hmset(str(report_dir), cache)
|
||||
self.redis.hset('lookup_dirs', uuid, str(report_dir))
|
||||
if uuid and not self.redis.hexists('lookup_dirs', uuid):
|
||||
self.redis.hmset(str(report_dir), cache)
|
||||
self.redis.hset('lookup_dirs', uuid, str(report_dir))
|
||||
|
||||
def report_cache(self, report_dir) -> dict:
|
||||
if isinstance(report_dir, Path):
|
||||
|
|
Loading…
Reference in New Issue