# Hash vs. Individual Keys

> You need to cache a user profile with fields like name, email and city. Why would you store it as a single Redis Hash instead of one key per field...

Canonical: https://www.internhack.in/learn/interview/redis-caching/redis-hash-vs-individual-keys
Last updated: 2026-11-28

Difficulty: Intermediate

## Question

You need to cache a user profile with fields like name, email and city. Why would you store it as a single Redis Hash instead of one key per field (user:42:name, user:42:email, ...)?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

Hash, Listpack encoding, Per-key overhead, Data modelling, Field-level TTL

Previous: [Pipeline vs. MULTI](https://www.internhack.in/learn/interview/redis-caching/redis-pipeline-transaction-diff) · Next: [Expire at Timestamp](https://www.internhack.in/learn/interview/redis-caching/redis-expire-at-timestamp) · [All of Redis & Caching](https://www.internhack.in/learn/interview/redis-caching)

## More Redis & Caching questions

- [Client ID](https://www.internhack.in/learn/interview/redis-caching/redis-client-id-command)
- [Wiping Data](https://www.internhack.in/learn/interview/redis-caching/redis-flush-commands)
- [Multiple Databases](https://www.internhack.in/learn/interview/redis-caching/redis-databases-count)
- [Atomic SET if not exists](https://www.internhack.in/learn/interview/redis-caching/redis-atomic-set-nx)
- [ZSET Range Query](https://www.internhack.in/learn/interview/redis-caching/redis-zset-range-by-score)
- [Script Caching](https://www.internhack.in/learn/interview/redis-caching/redis-lua-script-cache)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Redis & Caching](https://www.internhack.in/learn/interview/redis-caching)
