mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Merge
This commit is contained in:
commit
020bf28200
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue