Helper for clearing all the keys in a database. Use with caution!
(self)
| 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.""" |