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
Ex:
@cache(5*60) def foo(a): return a * a
This would invalidate the cache of function foo, 5 minutes after it being called the first time.
>>> foo(2) # will cache 4 >>> foo(2) # will use cache 4 >>> # wait for 5 min >>> foo(2) # will cache again
The text was updated successfully, but these errors were encountered:
I think using cachetools.TTLCache as the cache backend should handle what you want.
Sorry, something went wrong.
No branches or pull requests
Ex:
This would invalidate the cache of function foo, 5 minutes after it being called the first time.
The text was updated successfully, but these errors were encountered: