We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This lib is cool, thank you.
Question about @cache with @property. Is it possible to clear the cache?
@cache
@property
The text was updated successfully, but these errors were encountered:
Yes, but it might not consider this to be trivial, here follows 2 different way:
Say MyObject class defines the cached property foo, then you can access the cached function:
MyObject
foo
MyObject.foo.fget
MyObject.foo.fget.cache_clear()
undecorate(..)
kids.cache
from kids.cache import undecorate undecorate(MyObject.foo)[1].cache_clear()
Please note that the second method will work with ANY cached property (namely cached method, property, classmethod, staticmethod, class).
I'd like to keep this thread open as a reminder to answer your question in the README, and probably implement a little helper on this topic.
Sorry, something went wrong.
You are the man. Thank you!
No branches or pull requests
This lib is cool, thank you.
Question about
@cache
with@property
. Is it possible to clear the cache?The text was updated successfully, but these errors were encountered: