Clear the cache and cache statistics
()
| 626 | return _CacheInfo(hits, misses, maxsize, cache_len()) |
| 627 | |
| 628 | def cache_clear(): |
| 629 | """Clear the cache and cache statistics""" |
| 630 | nonlocal hits, misses, full |
| 631 | with lock: |
| 632 | cache.clear() |
| 633 | root[:] = [root, root, None, None] |
| 634 | hits = misses = 0 |
| 635 | full = False |
| 636 | |
| 637 | wrapper.cache_info = cache_info |
| 638 | wrapper.cache_clear = cache_clear |