title: Java Tomcat enable caching
body: <p>What is the best way to set up caching on tomcat?  </p>
  
  <p>Also how caching works?Is it url based,dir based or what?<br>
  I need url specific caching so the database don't make the same calculations for the same url's</p>