Overview:

  • key names are case sensitive
  • commands are NOT case sensitive

TYPE:

  • returns string with type of data stored in key: list, hash,…
  • you can test only one specific key, asterisk (*) does not work
  • if key does not exist, returns: none

KEYS:

  • shows keys based on given mask
  • all existing keys: KEYS *
  • keys based on mask: KEYS config*

TTL, PTTL:

  • “time to live” = retuns expiration time for the key
  • PTTL = result im miliseconds
  • -1 = no limit
  • -2 = key does not exist