Skip to content

Commit

Permalink
fix: add early return caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ameynert committed Dec 5, 2024
1 parent eb75600 commit ad4575c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions prymer/offtarget/offtarget_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ def _build_off_target_result(
or right_bwa_result.hit_count > self._max_primer_hits
):
result = OffTargetResult(primer_pair=primer_pair, passes=False)
if self._cache_results:
self._primer_pair_cache[primer_pair] = replace(result, cached=True)
return result

# Get the set of reference names with hits
Expand Down

0 comments on commit ad4575c

Please sign in to comment.