Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given the simple well-known architecture below:;/class/[Model (database)]-[View Controller], [View Controller]-[Client]

Where (conceptually) does the caching server(s) sit?

share|improve this question
up vote 4 down vote accepted

Your caching layer sits between Model and View Controller. You should not hit database for needless requests. These requests include in my opinion.

  • Almost all lookup tables. You read city and state list already. Why go to database again.
  • Facts used in almost every page. if you show User's detail every page. Hit to Database once and cache it.
  • Slow queries you can afford to show with some delay. For example you can cache How many orders your customer have and show it without going to database.

Note that Caching does not need to be for database only. For example you may cache messages from mail server, or expensive file parsing operation result also.

Caching is the number one layer which increases speed of application.

share|improve this answer
Thanks for that, very well explained. [accepted & +1] – A T Jun 5 '12 at 4:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.