Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default memoize implementation #858

Open
evhub opened this issue Oct 29, 2024 · 1 comment
Open

Change default memoize implementation #858

evhub opened this issue Oct 29, 2024 · 1 comment

Comments

@evhub
Copy link
Owner

evhub commented Oct 29, 2024

Currently, memoize by default allows the cache to grow without bound, which isn't great as it can lead to memory leaks, but is nice for making sure recursive functions always work well. An alternative compromise implementation could be to allow the cache to grow without bound, but always clear the cache after the end of the first call to the function highest up in the stack. Making this the default would be a breaking change that would need to be done on a major version increment, but we could just make it optional to start with.

@evhub evhub added this to the v3.2.0 milestone Nov 12, 2024
evhub added a commit that referenced this issue Nov 12, 2024
@evhub
Copy link
Owner Author

evhub commented Nov 12, 2024

Implemented but not currently set as default; that should only be done with a warning once we hit Coconut v4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant