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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user