You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
User story: I have a program that undergoes periods of simulation, then reporting on the simulation. During the simulation, I would like to mark some or maybe all @memoized functions as being "volatile", that is to say, not memoized. During reporting, the values returned from functions are not expected to change, so at that point they should be memoized.
A means to invalidate the cache (for some or all @memoized functions) could also be useful in some cases, but immediately going back to being cached would prove to be a problem for the above use case.
Another dimension of this is that sometimes, only values resulting from a specific argument pattern may need to be invalidated; if we invalidated everything from the function, this could greatly reduce performance in some cases. For instance, in the above user story, we may have multiple unique "simulation ids", and just because we run a new simulation, doesn't mean we need to recalculate all the data generated for the old simulation.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
User story: I have a program that undergoes periods of simulation, then reporting on the simulation. During the simulation, I would like to mark some or maybe all @memoized functions as being "volatile", that is to say, not memoized. During reporting, the values returned from functions are not expected to change, so at that point they should be memoized.
A means to invalidate the cache (for some or all @memoized functions) could also be useful in some cases, but immediately going back to being cached would prove to be a problem for the above use case.
Another dimension of this is that sometimes, only values resulting from a specific argument pattern may need to be invalidated; if we invalidated everything from the function, this could greatly reduce performance in some cases. For instance, in the above user story, we may have multiple unique "simulation ids", and just because we run a new simulation, doesn't mean we need to recalculate all the data generated for the old simulation.
The text was updated successfully, but these errors were encountered: