EXISTS - How to Check if a Key Exists in Redis

Feature thumb redis course thumb

To check to see if a key exists in a Redis database, you can run the query EXISTS, which will return a 1 if the key is found and a 0 if the key is not found.> SET title "My Post"
OK> EXISTS title
(integer) 1> EXISTS a_key_that_does_not_exist
(integer) 0