diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-03-17 00:24:12 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-03-17 00:24:12 +0100 |
commit | 020bf28200ca0025dd33e9c563df76e39388d832 (patch) | |
tree | 454678cf5f72422bad888bee67d475d5cd7f73e0 | |
parent | 846fd302a0155ca6d277cb274ca6c39d08860013 (diff) | |
parent | 29a837d8575d581c99e8626a3eda8c0e10888cac (diff) | |
download | cpython-git-020bf28200ca0025dd33e9c563df76e39388d832.tar.gz |
Merge
-rw-r--r-- | Lib/functools.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/functools.py b/Lib/functools.py index 4dd5913e0d..7fc42af386 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -226,9 +226,11 @@ def lru_cache(maxsize=100, typed=False): 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 |