Re: [squid-users] java web start jars won't be cached

From: Thibault Ketterer <thekit_at_gmail.com>
Date: Wed, 25 Mar 2009 11:23:08 +0100

> This request is determined to NOT get get a cached copy of this file.
> Cache-control: no-cache, Pragma: no-cache, If-Modified-Since Dec 1969...
> But the request only affects whether the request is satisfied from cache.
> Whether or not the object is cached at all is (in part) determined by the
> server's response.

I,
First I think that if two clients send the same request to a server,
the server should send the same answer. That's why I was looking at
the client requests.
I tried java web start 1.5 and java web start 1.6, guess what ? It is
working with java 1.5.
I read all the traffic, the server response are exactly the same, and
the only difference is in the client request to squid

 Cache-Control: no-cache

in the java 1.6 request.

Is there any way to override the cache-control, though my
"ignore-no-cache" does not seem to work ?

I will try with squid 3 (I currently used 2.6 STABLE )

Thank you for your answers.

For more informations, here are the HTTP requests:

JAVA 1.6

client -> squid
GET http://xxx.xxx.9.138:8080/superviseurUcte/gsrAppSigne.jar HTTP/1.1
content-type: application/x-java-archive
accept-encoding: pack200-gzip,gzip
User-Agent: JNLP/6.0 javaws/1.6.0_01 (b06) Java/1.6.0_01
UA-Java-Version: 1.6.0_01
Host: xxx.xxx.9.138:8080
Cache-Control: no-cache
Pragma: no-cache
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Proxy-Connection: keep-alive
If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT

squid -> server
GET /superviseurUcte/gsrAppSigne.jar HTTP/1.0
Content-Type: application/x-java-archive
Accept-Encoding: pack200-gzip,gzip
User-Agent: JNLP/6.0 javaws/1.6.0_01 (b06) Java/1.6.0_01
UA-Java-Version: 1.6.0_01
Host: xxx.xxx.9.138:8080
Pragma: no-cache
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
Via: 1.1 local:3128 (squid/2.6.STABLE6)
X-Forwarded-For: xxx.xxx.8.179
Cache-Control: no-cache, max-age=6000
Connection: keep-alive

server -> squid
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1
Accept-Ranges: bytes
ETag: W/"38363415-1237455030000"
Last-Modified: Thu, 19 Mar 2009 09:30:30 GMT
Content-Type: application/java-archive
Content-Length: 38363415
Date: Tue, 24 Mar 2009 18:31:26 GMT
Connection: keep-alive
..DATA...

JAVA 1.5
client -> squid
GET http://xxx.xxx.9.138:8080/superviseurUcte/gsrAppSigne.jar HTTP/1.1
pragma: no-cache
accept-encoding: pack200-gzip,gzip
content-type: application/x-java-archive
User-Agent: JNLP/1.5 javaws/1.5.0_17 (b04) J2SE/1.5.0_17
UA-Java-Version: 1.5.0_17
Host: xxx.xxx.9.138:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Proxy-Connection: keep-alive

squid -> server
GET /superviseurUcte/gsrAppSigne.jar HTTP/1.0
Pragma: no-cache
Accept-Encoding: pack200-gzip,gzip
Content-Type: application/x-java-archive
User-Agent: JNLP/1.5 javaws/1.5.0_17 (b04) J2SE/1.5.0_17
UA-Java-Version: 1.5.0_17
Host: xxx.xxx.9.138:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Via: 1.1 local:3128 (squid/2.6.STABLE6)
X-Forwarded-For: xxx.xxx.9.33
Cache-Control: max-age=6000
Connection: keep-alive

server -> squid
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1
Accept-Ranges: bytes
ETag: W/"38363415-1237455030000"
Last-Modified: Thu, 19 Mar 2009 09:30:30 GMT
Content-Type: application/java-archive
Content-Length: 38363415
Date: Tue, 24 Mar 2009 18:11:55 GMT
Connection: keep-alive
...DATA...

--
Thibault ketterer
Received on Wed Mar 25 2009 - 10:23:12 MDT

This archive was generated by hypermail 2.2.0 : Tue Mar 31 2009 - 12:00:03 MDT