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

From: Thibault Ketterer <Thibault.Ketterer_at_gmail.com>
Date: Fri, 20 Mar 2009 17:59:13 +0100

I squid-users,
I am trying to cache some jar from java web start.

I augmented the cache_dir size to match the jar size and I tuned the
refresh_pattern parameter for jar file like this :

 cache_dir ufs /local/squid 1000 16 256
 refresh_pattern -i \.jar$ 0 100% 1440 override-expire
override-lastmod reload-into-ims ignore-no-cache ignore-private
ignore-auth

But squid won't cache the jar file. In the store.log :
  1237561956.490 RELEASE 00 00000085 982C3FB51B721FD777E121DF5C23653C
 200 1237561059 1237455030 -1 application/java-archive
38363415/16182969 GET
http://server_IP:8080/superviseurUcte/gsrAppSigne.jar

Squid seem to release it as soon as it get it, but why ?

Furthermore if a download the jar file with a python request,
containing apparently the same options, squid caches it.
in the store.log
  1237479895.109 SWAPOUT 00 00000009 95484B2D4855572C7835C663D0871C0D
 200 1237479005 1237455702 -1 application/java-archive
37531320/37531320 GET
http://server_IP:8080/superviseurUcte/gsrAppSigne.jar

Then If I refresh the jar with javaws, squid uses its cache.
But if I change the jar, again
 javaws -> never goes into cache
 python -> cache

I used wireshark to capture the request packets :

=== the packet which caches (python)

Frame 1 (502 bytes on wire, 502 bytes captured)
Ethernet II, Src: HewlettP_46:97:c4 (00:1a:4b:46:97:c4), Dst:
Ibm_d8:40:5c (00:14:5e:d8:40:5c)
Internet Protocol, Src: source_IP (source_IP), Dst: proxy_IP (proxy_IP)
Transmission Control Protocol, Src Port: 39047 (39047), Dst Port:
squid (3128), Seq: 0, Ack: 0, Len: 448
Hypertext Transfer Protocol
   GET http://server_IP:8080/superviseurUcte/gsrAppSigne.jar HTTP/1.1\r\n
   content-type: application/x-java-archive\r\n
   accept-encoding: pack200-gzip,gzip\r\n
   User-Agent: JNLP/6.0 javaws/1.6.0_01 (b06) Java/1.6.0_01\r\n
   UA-Java-Version: 1.6.0_01\r\n
   Host: server_IP:8080\r\n
   Cache-Control: no-cache\r\n
   Pragma: no-cache\r\n
   Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n
   Proxy-Connection: keep-alive\r\n
   If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT\r\n
   \r\n

=== the packet which won't cache (java web start)

Frame 4 (502 bytes on wire, 502 bytes captured)
Ethernet II, Src: HewlettP_46:97:c4 (00:1a:4b:46:97:c4), Dst:
Ibm_d8:40:5c (00:14:5e:d8:40:5c)
Internet Protocol, Src: source_IP (source_IP), Dst: proxy_IP (proxy_IP)
Transmission Control Protocol, Src Port: 39003 (39003), Dst Port:
squid (3128), Seq: 0, Ack: 0, Len: 448
Hypertext Transfer Protocol
   GET http://server_IP:8080/superviseurUcte/gsrAppSigne.jar HTTP/1.1\r\n
   content-type: application/x-java-archive\r\n
   accept-encoding: pack200-gzip,gzip\r\n
   User-Agent: JNLP/6.0 javaws/1.6.0_01 (b06) Java/1.6.0_01\r\n
   UA-Java-Version: 1.6.0_01\r\n
   Host: server_IP:8080\r\n
   Cache-Control: no-cache\r\n
   Pragma: no-cache\r\n
   Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n
   Proxy-Connection: keep-alive\r\n
   If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT\r\n
   \r\n

I can join the python source, but for the javaws it is another story,
I don't know if it uses some special TCP option or something that
forces squid to not put the jar file in its cache...

Any advice will be greatly apprecied !

--
Thibault ketterer
Received on Fri Mar 20 2009 - 16:59:23 MDT

This archive was generated by hypermail 2.2.0 : Fri Mar 20 2009 - 12:00:03 MDT