Skip to content

Commit

Permalink
fixed cache writing
Browse files Browse the repository at this point in the history
  • Loading branch information
cbizon committed Jul 15, 2024
1 parent ff0b32e commit 19666f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/service_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ async def entry(message, guid, coalesce_type, caller) -> (dict, int):
else:
logger.info(f"{guid}: Results cache miss")
else:
mcq = False
member_ids = []
if read_from_cache:
results = results_cache.get_lookup_result(workflow_def, query_graph)
if results is not None:
Expand All @@ -218,7 +220,7 @@ async def entry(message, guid, coalesce_type, caller) -> (dict, int):
# so we want to write to the cache if bypass cache is false or overwrite_cache is true
if overwrite_cache or (not bypass_cache):
if infer:
results_cache.set_result(input_id, predicate, qualifiers, source_input, caller, workflow_def, final_answer)
results_cache.set_result(input_id, predicate, qualifiers, source_input, caller, workflow_def, mcq, member_ids, final_answer)
elif {"id": "lookup"} in workflow_def:
results_cache.set_lookup_result(workflow_def, query_graph, final_answer)

Expand Down

0 comments on commit 19666f6

Please sign in to comment.