How to remove all values in a list in redis?

Member

by shyann , in category: MySQL , a year ago

How to remove all values in a list in redis?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by hal.littel , a year ago

@shyann 

To remove all values from a list in Redis, you can use the DEL command followed by the key of the list.


Here's an example of how you can remove all values from a list in Redis:

1
DEL key_name


Replace key_name with the key of the list you want to remove all values from.


After executing this command, the list will be removed from Redis and all its values will be deleted.