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

Cached value is reused even if function has changed #3

Open
Japanuspus opened this issue Dec 21, 2018 · 0 comments
Open

Cached value is reused even if function has changed #3

Japanuspus opened this issue Dec 21, 2018 · 0 comments

Comments

@Japanuspus
Copy link

More a suggestion really: you can include the has of the function in the list of cache keys to get automatic cache invalidation if the function changes...
This would be a bot flaky, as it would not handle changes in dependent functions, and I don't know how stable python function hashes are in practice. Still, having done a lot of memoization in non-introspecting languages where this is not an option, I think this is a neat possibility.

Alternatively, you might want to add a way of clearing the cache?

But thanks for putting this up!

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

No branches or pull requests

1 participant