Skip to main content
2 of 3
added 374 characters in body
Arseni Mourzenko
  • 135.8k
  • 31
  • 350
  • 522

If your service is hosted on a single machine, chances are that in-memory caching will have a better performance and will be easier to implement.

On the other hand, there are two situations where local caching is not enough:

  • As soon as your service starts to be hosted on multiple servers, which is the case for most services hosted in production, you may need to implement either centralized¹ or distributed² caching in order for your services to share the same cache.

In this case, if your language/framework/infrastructure doesn't already have the feature (such as AppFabric in Microsoft community), Redis appears an excellent alternative.

  • Redis has much more features than ordinary cache systems. Have you seen the list of Redis commands? Instead, most caching systems are limited to three actions: add, get, remove.

If you need those additional features, Redis is obviously a solution to your needs.


¹ In centralized caching, all clients access the same caching service (which, internally, can use failover as well) which handles all the data and its invalidation.

² In distributed caching, each client stores cached entities. When an entity is changed or removed, the action should be dispatched to all the nodes to ensure consistency.

Arseni Mourzenko
  • 135.8k
  • 31
  • 350
  • 522