MCPcopy Create free account
hub / github.com/psf/cachecontrol / clear

Method clear

cachecontrol/caches/redis_cache.py:40–44  ·  view source on GitHub ↗

Helper for clearing all the keys in a database. Use with caution!

(self)

Source from the content-addressed store, hash-verified

38 self.conn.delete(key)
39
40 def clear(self) -> None:
41 """Helper for clearing all the keys in a database. Use with
42 caution!"""
43 for key in self.conn.keys():
44 self.conn.delete(key)
45
46 def close(self) -> None:
47 """Redis uses connection pooling, no need to close the connection."""

Callers 1

test_getattr_during_gcFunction · 0.80

Calls 1

deleteMethod · 0.45

Tested by 1

test_getattr_during_gcFunction · 0.64