0

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?

Khaled
  • 36,533
  • 8
  • 72
  • 99

2 Answers2

1

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.

Khaled
  • 36,533
  • 8
  • 72
  • 99
  • 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
1

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.

Nic Cottrell
  • 1,302
  • 16
  • 32