Skip to content

Commit

Permalink
fixup! Simplify cache invalidation as spiral error occur
Browse files Browse the repository at this point in the history
  • Loading branch information
guillett committed Feb 5, 2024
1 parent 0904edf commit 287de7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openfisca_core/simulations/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@ def invalidate_cache_entry(self, variable: str, period):
def invalidate_spiral_variables(self, variable: str):
invalidate_entries = False
for frame in self.tracer.stack:
if not invalidate_entries and frame["name"] == variable:
invalidate_entries = True
if invalidate_entries:
self.invalidate_cache_entry(str(frame["name"]), frame["period"])
elif frame["name"] == variable:
invalidate_entries = True

# ----- Methods to access stored values ----- #

Expand Down

0 comments on commit 287de7b

Please sign in to comment.