Pergunta de entrevista da empresa SlideShare

I didn't have much experience with caching and database querying tricks at the time (e.g. how to avoid N+1 query problem), so I stumbled there.