While learning Rails, little emphasis is given on performance partly
because most of those tutorials are usually small applications with
minimal records. But as one progresses and starts handling huge apps,
performance becomes critical. Optimizing queries and handling
bottlenecks such as N + 1 query problem tops todo list…
Check out more on this tutorial by following the link
http://www.victorareba.com/tutorials/speed-your-rails-app-with-model-caching-using-redis