Senior
What data was stored in Redis and how did you understand that the announcements were hot?
sobes.tech AI
Answer from AI
In Redis, data that requires quick and frequent retrieval is usually stored, such as ad caches, user sessions, view counters, and ratings. To determine which ads are "hot" (i.e., actively requested and relevant), several approaches were used:
- Monitoring the request frequency for ads — if a key in Redis is read often, it means the ad is popular.
- Using TTL (time to live) and updating it during active use to prevent hot data from being deleted.
- Analyzing access logs or metrics to identify trends and popular ads.
Thus, Redis served to store exactly those data that needed to be quickly delivered to the user, minimizing the load on the main database.