Server Fault is a question and answer site for system and network administrators. 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

I've installed Apache's mod_mem_cache on a server that serves multiple websites. I needed to install it in a hurry as I had a massive traffic spike and was firefighting. It has improved performance massively and all of my sites seem to be serving the correct content, all is well, but I have two questions:

  1. How do I restrict the content types that are cached? Ideally I'd like to cache just css|js|jpg. I tried a <FilesMatch> within the mod_mem_cache.conf but that didn't work.

  2. Is there any way to see which files are in the cache at any point?

share|improve this question
It's been removed from Apache 2.4 so I wouldn't get too attached to it, or spend too much time learning how to configure it. Look into disk caching. – EJP Aug 22 '12 at 12:19
Or look in to Varnish. – pjmorse Sep 18 '12 at 23:50

The answer above is pretty good but...

Personally I would skip mod_mem_cache and install Varnish IMO a much better tool for the job and comes with some very useful debugging and metrics. Put varnish on port 80 and apache on 8080 or another used high level port.

share|improve this answer
  2. Default path is /var/cache/apache/ (
share|improve this answer
Hi japao, thanks for the comment but that wasn't exactly what I was looking for. /var/cache is the mod_disk_cache location and the askapache article seems to be talking about cache headers that are sent to the browser. – Steve Claridge Aug 21 '12 at 9:21

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.