Please mention some operation keys of Redis?
- DEL:-if the key exists then it deletes the key
Syntax:- redis 127.0.0.1:6379> DEL KEY_NAME
- EXISTS:-this checks whether the key exists or not
Syntax:- redis 127.0.0.1:6379> EXISTS KEY_NAME
- EXPIRE:- this sets the expiry date of the key after the specified time
Syntax:- redis 127.0.0.1:6379> Expire KEY_NAME TIME_IN_SECONDS
- TTL:-this shows the time remaining in the keys expiry
- RANDOMKEY:-this returns the random key
Syntax:- redis 127.0.0.1:6379> RANDOMKEY
- TYPE:-this return the data type of the value which is stored in the key
- KEYS pattern:- this return the keys which match with the mentioned pattern
BY Best Interview Question ON 17 Feb 2019