Search code examples
cachingredisin-memory-database

When to use Redis (in-memory db) vs when to use a cache?


I've recently learned that Uber uses a cache to store its map data where as twitter uses Redis to store and retrieve data related to a user's homepage. I'm trying to understand when to use a cache vs an in-memory database such as Redis. It seems like fast retrieval is required in both cases I described.

Thanks!


Solution

  • An in-memory database is also a cache. What we usually mean by cache is that the data is retrieved from memory, and not from disk. In the case of Uber, it looks like they are also using Redis as a cache: https://eng.uber.com/tech-stack-part-one-foundation/.