Skip to content

Commit

Permalink
fix cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
uhbrar committed Dec 7, 2023
1 parent def832e commit 8bc9499
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/results_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ def get_lookup_query_key(self, workflow, query_graph):
return json.dumps(keydict, sort_keys=True)

def get_lookup_result(self, workflow, query_graph):
key = self.get_query_key(workflow, query_graph)
key = self.get_lookup_query_key(workflow, query_graph)
result = self.redis.get(key)
if result is not None:
result = json.loads(gzip.decompress(result))
return result


def set_lookup_result(self, workflow, query_graph, final_answer):
key = self.get_query_key(workflow, query_graph)
key = self.get_lookup_query_key(workflow, query_graph)

self.redis.set(key, gzip.compress(json.dumps(final_answer).encode()))

Expand Down

0 comments on commit 8bc9499

Please sign in to comment.