Clear the cache and cache statistics
()
| 701 | return _CacheInfo(hits, misses, maxsize, cache_len()) |
| 702 | |
| 703 | def cache_clear(): |
| 704 | """Clear the cache and cache statistics""" |
| 705 | nonlocal hits, misses, full |
| 706 | with lock: |
| 707 | cache.clear() |
| 708 | root[:] = [root, root, None, None] |
| 709 | hits = misses = 0 |
| 710 | full = False |
| 711 | |
| 712 | wrapper.cache_info = cache_info |
| 713 | wrapper.cache_clear = cache_clear |