Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

From what I understand there are three types of caching,

  1. Disk cache on Apache Server httpd.conf
  2. Memory cache on Apache Server httpd.conf
  3. Tomcat cache on Tomcat 7.0 (Configuring context.xml)

Between all the three types of caching which is the faster and the least resource intensive?

What is the difference between Apache caching and tomcat cache?

When should I use tomcat caching and apache caching? Or can I run both in my cluster?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It is not about what caching you need/want to use. It is about the type and requirements of your web application. Apache can run php/perl code, but tomcat is used to run java/jsp code.

As for the caching question, the memory caching is for sure much faster than any disk caching.

share|improve this answer
    
Thank you for clearing things up. However, I have a few more clarification. I wish to setup apache (memory caching) for my load balancer, do I only need to setup in the (httpd.conf) file? That is the only settings I need to do right? –  dwyane johnson Mar 22 '12 at 12:37

It probably depending on what you are caching. If your app server is mostly generated static pages for anonymous visitors you should probably consider external caching options like Varnish.

share|improve this answer

Your Answer

 
discard

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.