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.

I'm running mod_mem_cache with mod_cache, but I don't seem to have any way of telling whether images are served from the cache or not, so I can't tell how well it's working. Is there some way of seeing via mod_status, adding cache status headers to responses or similar? The servers it's on are quite happily handling sustained loads of about 200 requests/sec, but I can't tell if/how much the caching is helping that.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You have a few options from the access log perspective.

1) log %{Age}o and everytime it's non-empty, it was served from the cache (this doesn't work if you're proxying to something that also is setting the Age header!)

2) SetEnv CACHE_MISS 1 and log %{CACHE_MISS}e

This second one works because the SetEnv directive only has a chance to run when the response is NOT served from the cache, and the environment variables are not stored in the cache.

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.