MCPcopy Index your code
hub / github.com/python/cpython / clear_cache

Method clear_cache

Lib/zoneinfo/_zoneinfo.py:95–103  ·  view source on GitHub ↗
(cls, *, only_keys=None)

Source from the content-addressed store, hash-verified

93
94 @classmethod
95 def clear_cache(cls, *, only_keys=None):
96 if only_keys is not None:
97 for key in only_keys:
98 cls._weak_cache.pop(key, None)
99 cls._strong_cache.pop(key, None)
100
101 else:
102 cls._weak_cache.clear()
103 cls._strong_cache.clear()
104
105 @property
106 def key(self):

Callers 14

test_cache_clearMethod · 0.45
clear_cachesFunction · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45

Calls 2

popMethod · 0.45
clearMethod · 0.45

Tested by 13

test_cache_clearMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
test_cache_missMethod · 0.36