httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendon Anderson <>
Subject [users@httpd] mod_cache is caching content with Cache-Control: private response headers
Date Wed, 05 Oct 2011 13:16:07 GMT
I am setting the Cache-Control: private header in a response on a
certain url, but mod_cache is still caching this url.

Response Headers as indicated by Firefox (Chrome reports similar results):

Response Headers
Date	Wed, 05 Oct 2011 12:58:41 GMT
Server	Apache/2.2.20 (Win32) mod_jk/1.2.32
Expires	Wed, 05 Oct 2011 12:59:25 GMT
Cache-Control	private
Content-Language	en-US
Content-Length	7046
Age	15
Content-Type	text/html;charset=UTF-8
X-Cache	MISS from
Via	1.0 (squid/2.6.STABLE22)
Proxy-Connection	keep-alive

Logs indicating url is being cached (url set to private is /hrportal/home):

(accessing using Chrome)
[Wed Oct 05 07:58:25 2011] [debug] mod_cache.c(757): cache: Removing
[Wed Oct 05 07:58:25 2011] [info] mem_cache: Cached url:
(accessing using Firefox)
[Wed Oct 05 07:58:41 2011] [debug] mod_cache.c(298): cache: running
CACHE_OUT filter
[Wed Oct 05 07:58:41 2011] [debug] mod_cache.c(312): cache: serving

Mod_cache config:
<IfModule mod_cache.c>
	CacheIgnoreNoLastMod On
	CacheIgnoreQueryString On
	CacheIgnoreHeaders Set-Cookie
	CacheIgnoreURLSessionIdentifiers jsessionid

	CacheStorePrivate Off

	<IfModule mod_mem_cache.c>
		CacheEnable mem /
		#100MB in KB
		MCacheSize 102400
		#MCacheMinObjectSize 1
		#4MB in bytes
		MCacheMaxObjectSize 4194304

What am I doing wrong?  From my reading on mod_cache, it should NOT
cache if the Cache-Control header contains private.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message