Terence
Terence

Reputation: 11108

How to test if mod_cache works

Some information:

"Cache-Control: must-revalidate, max-age=300"

This tells mod_cache to cache the page for 300 seconds (max-age) - unfortunately mod_cache doesn't know the s-maxage option (see http://www.mnot.net/cache_docs/#CACHE-CONTROL), that's why we must use the max-age option (which also tells your browser to cache).

If mod_cache knew the s-maxage option, we could use

"Cache-Control: must-revalidate, max-age=0, s-maxage=300"

which would tell mod_cache, but not the browser, to cache the page.

The question: How do I know if mod_cache is actually memory caching anything at all.

Upvotes: 0

Views: 2905

Answers (2)

Steve Clay
Steve Clay

Reputation: 8781

200 responses will contain an Age header. At least it does on Apache 2.2. I did not see the header on 304 responses.

Upvotes: 0

Lejo
Lejo

Reputation: 1011

With firebug, you can disable the entire cache, so every css, js, image, video ...etc, it will request to the web server.

So if this mod_cache is working, activate the firebug cache and the files that have that header, only will be requested to the web server every s-maxage time

Upvotes: 1

Related Questions