Add cache flag to the decorator. #33
DavidZalevsky
started this conversation in
Ideas
Replies: 1 comment
-
Thanks for the suggestion! How about setting the cache size to 0 instead of adding another parameter? I think this approach might already work, though there isn’t a test for it yet. However, even when the cache size is set to zero, currently the extra time wheel thread is still running, which can be optimized. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We should add a default flag that turns on/off (bypass) cache into a decorator.
Example:
@memoize(Cache("tlfu", 1000), timeout=timedelta(hours=1), lock=True, typed=False, cache_enabled=True)
Thanks to such a solution, if our production application uses the cache, then on the test environment, we can easily disable it with an environment variable in order to speed up testing.
Beta Was this translation helpful? Give feedback.
All reactions