Skip to content

Instantly share code, notes, and snippets.

@nire0510
Created April 11, 2018 12:00
Show Gist options
  • Save nire0510/07e39ff5faac0ccd4f9ce393f92e63cf to your computer and use it in GitHub Desktop.
Save nire0510/07e39ff5faac0ccd4f9ce393f92e63cf to your computer and use it in GitHub Desktop.
Check which kind of value is behind REDIS key
  • strlen KEY - if this works, it is a string
  • hlen KEY - if this works, it is a hash
  • llen KEY - if this works, it is a list
  • scard KEY - if this works, it is a set
  • zcard KEY - if this works, it is a sorted-set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment