Redis Hashes

  • Hashes are list of fileds and value pair
  • Represented as
    • field1:value1, field2:value2, filed3:value3
  • They are similar to JSON object
  • Represents mapping relationship between fields and values
  • Elements in hashes
    • are string
    • fileds with their values
  • Hashes are schemaless
  • Hashes can contain more than 4 billion elements

Use case

  • User Information
    • name
    • location
  • Schemless situvation
    • Example Object wholes fileds(attributes and values) are not decided

HGET / HSET / HGETALL

HMGET

HLEN

HDEL

HEXIST

HKEYS

HVALS

HINCRBY

HRANDFIELD

Leave a Comment