I find out what was the reason for not caching the .jhtml file, it was missing validator (Etag and Last-Modified) header on the origin. Now the BIG question, Is anybody know how to force caching (regardless the Cache-Control header) if there are no validator headers on the object? On Sat, 2009-01-24 at 20:50 +0200, Maoz wrote: > Hello All, > > I configure new reverse proxy, and I trying to cache .jhtml file, for > some reason the .jhtml files not been cached. > > > Is there a way to understand the reason that objects not been cached? > Is there some kind of a log that explain the reason of TCP_MISS ? > > Is somebody have any idea of a solution? > > For testing I create two simple files with same content .html .jhtml > extension and pool the headers from origin and from cache > > > ########################### from cache ########################## > > > maoz@maoz-laptop:~$ curl -I http://www.example.com/maoz1.jhtml > HTTP/1.0 200 OK > Date: Sat, 24 Jan 2009 00:17:37 GMT > Server: Apache > Cache-Control: max-age=60 > Set-Cookie: sessionid=P5IPGKZCI4PLXQFIAEPCJBQ;path=/ > Set-Cookie: DYN_USER_ID=4042857418;domain=.example.com;path=/ > Set-Cookie: > DYN_USER_CONFIRM=c77f6aa63e7959cf8de224829409adfd;domain=.example.com;path=/ > Content-Length: 3 > Xonnection: Xeep-Alive > Content-Type: text/html > X-Cache: MISS from localhost > Via: 1.0 localhost (squid/3.0.PRE5) > Connection: close > > maoz@maoz-laptop:~$ curl -I http://www.example.com/maoz1.jhtml > HTTP/1.0 200 OK > Date: Sat, 24 Jan 2009 00:17:52 GMT > Server: Apache > Cache-Control: max-age=60 > Set-Cookie: sessionid=WJGJHTSVNOX2TQFIAEPCGWQ;path=/ > Set-Cookie: DYN_USER_ID=4043162771;domain=.example.com;path=/ > Set-Cookie: > DYN_USER_CONFIRM=29c9bd2b9405f35b971d9139573ece9d;domain=.example.com;path=/ > Content-Length: 3 > Xonnection: Xeep-Alive > Content-Type: text/html > X-Cache: MISS from localhost > Via: 1.0 localhost (squid/3.0.PRE5) > Connection: close > > maoz@maoz-laptop:~$ curl -I http://www.example.com/maoz.jhtml > HTTP/1.0 500 Internal Server Error > Date: Sat, 24 Jan 2009 00:17:47 GMT > Server: Apache > Cache-Control: max-age=60 > Set-Cookie: sessionid=WKCQWCFIBRMI5LAVAEPCIIQ;path=/ > Set-Cookie: DYN_USER_ID=4042492403;domain=.example.com;path=/ > Set-Cookie: > DYN_USER_CONFIRM=7351e74431c03c9ca95cd25e2f2f31d0;domain=.example.com;path=/ > Content-Length: 190 > Content-Type: text/html > X-Cache: MISS from localhost > Via: 1.0 localhost (squid/3.0.PRE5) > Connection: close > > maoz@maoz-laptop:~$ curl -I http://www.example.com/maoz.jhtml > HTTP/1.0 500 Internal Server Error > Date: Sat, 24 Jan 2009 00:17:47 GMT > Server: Apache > Cache-Control: max-age=60 > Content-Length: 190 > Content-Type: text/html > Age: 19 > X-Cache: HIT from localhost > Via: 1.0 localhost (squid/3.0.PRE5) > #################################################### > > #################from origin######################## > cache1:~# curl -I http://www.example.com/maoz1.jhtml > HTTP/1.1 200 OK > Date: Fri, 23 Jan 2009 23:53:53 GMT > Server: Apache > Cache-Control: max-age=60 > Set-Cookie: sessionid=BMCRUFJEX13QNQFIAEPCNXQ;path=/ > Set-Cookie: DYN_USER_ID=4043355508;domain=.example.com;path=/ > Set-Cookie: > DYN_USER_CONFIRM=d326ebec81837dcbf2cb3218c7d805e0;domain=.example.com;path=/ > Content-Length: 3 > Content-Type: text/html > > cache1:~# curl -I http://www.example.com/maoz1.html > HTTP/1.1 200 OK > Date: Fri, 23 Jan 2009 23:54:29 GMT > Server: Apache > Cache-Control: max-age=60 > Last-Modified: Fri, 23 Jan 2009 23:23:58 GMT > ETag: "a68d3c-5-497a518e" > Accept-Ranges: bytes > Content-Length: 5 > Content-Type: text/html > #################################################### > > thanks!! > Maoz >