Skip to content

Instantly share code, notes, and snippets.

@karakays
Last active February 28, 2021 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karakays/07309636a207f6f386a0c311ce92dded to your computer and use it in GitHub Desktop.
Save karakays/07309636a207f6f386a0c311ce92dded to your computer and use it in GitHub Desktop.

List keys

KEYS \*

Get type of key

TYPE key

Value types

string

list

set

zset

hash
hashes consist of arbitrary string fields - string value pairs.

stream

Get SET with key=foo

SMEMBERS foo

Get fields from HASH with key=foo

HGETALL foo

Get field=bar from HASH with key=foo

HMGET foo bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment