1.

Please mention some operation keys of Redis?

Answer»
  • 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


Discussion

No Comment Found