commit | 954cf578c760e2b9e0fe9b3eedcfd3d1bfc7f7ec | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Fri Mar 16 18:22:26 2012 -0500 |
committer | Benjamin Peterson <benjamin@python.org> | Fri Mar 16 18:22:26 2012 -0500 |
tree | b79d6a117411a86be2e4d9c9f9ccb6e46b287831 | |
parent | 01feaecbfa37ad85b8ae51c8c7743e1ce8d5a92f [diff] [blame] |
clear the root with the cache
diff --git a/Lib/functools.py b/Lib/functools.py index af24f42..3455d7c 100644 --- a/Lib/functools.py +++ b/Lib/functools.py
@@ -227,9 +227,11 @@ def cache_clear(): """Clear the cache and cache statistics""" - nonlocal hits, misses + nonlocal hits, misses, root with lock: cache.clear() + root = [] + root[:] = [root, root, None, None] hits = misses = 0 wrapper.cache_info = cache_info