1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 21:26:44 +02:00

new cache method: delete(key)

This commit is contained in:
Igor Chubin
2019-04-29 19:25:37 +02:00
parent dbc7b121b4
commit 259c9bea8d
+13
View File
@@ -43,3 +43,16 @@ def get(key):
pass
return value
return None
def delete(key):
"""
Remove `key` from the database
"""
if _REDIS:
if _REDIS_PREFIX:
key = _REDIS_PREFIX + key
_REDIS.delete(key)
return None