Hashes
1. Hash¶
- Key with named fields
- Single level
- Provide commands on those fields
- e.g.) INCR
- Dynamically add and remove fields
- Stored extremply efficiently
- Are not recursive
2. HSET - 해시 저장¶
- 해시를 저장한다.
HSET example
HSET evnet:judo capacity 12000 location "Nippo Budokan" ticket_price:gold 100 availability:gold 8000
3. HEXISTS, HDEL, HINCRBY, HINCRBYFLOAT¶
4. HGET, HGETALL, HSCAN, HMGET, HKEYS, HVALS¶
이런 해시 값에서 HSCAN 을 이용해 모든 availiablity:*
패턴의 field 를 순회해보자.
> HSCAN event:judo 0 match availability:*
1) "0"
2) 1) "availability:gold"
2) "7990"
3) "availability:silver"
4) "2000"
5. Hash Uses Cases¶
- Rate Limiting
- Session Cache
Last update:
May 16, 2023
Created: May 16, 2023
Created: May 16, 2023