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.
127.0.0.1:6379> SET title "My Post"
OK
127.0.0.1:6379> EXISTS title
(integer) 1
127.0.0.1:6379> EXISTS a_key_that_does_not_exist
(integer) 0
OK
127.0.0.1:6379> EXISTS title
(integer) 1
127.0.0.1:6379> EXISTS a_key_that_does_not_exist
(integer) 0