📅  最后修改于: 2023-12-03 15:34:41.755000             🧑  作者: Mango
redis delete
is a command used in the Redis database to delete keys. Keys can be deleted one at a time or in bulk by matching a pattern.
redis-cli DEL key [key ...]
key
: The name of the key to delete. You may provide multiple keys separated by spaces.To delete a single key:
redis-cli DEL mykey
To delete multiple keys:
redis-cli DEL key1 key2 key3
To delete all keys matching a pattern:
redis-cli DEL user:*
redis-cli DEL mykey
redis-cli DEL key1 key2 key3
redis-cli DEL user:*