[squid-users] refresh_pattern using squid on windows problem

From: Alexander Shopov <[email protected]>
Date: Thu, 18 Nov 2004 18:03:35 +0200

Hello everybody,

After reading the docs, config files, searching the Internet and the
mail archives and experimenting with different debugging options I
decided to ask for help.

My problem is that I am trying to use Squid squid-2.5.STABLE7-NT-bin.zip
(on Windows 2000) to accelerate access to a particular site. I am trying
to enforce cacheability of certain objects like pictures, js, etc.

My configuration is as follows:

[server] --------------> [Squid] ----> [clients]
             slow VPN LAN

I am trying to make some classes of files to be cached on the Squid
machine no matter what the server and the clients HTTP requests are.

What I am doing to alleviate this is as follows:

1. In the section for noncaching I am doing this:

acl QUERY urlpath_regex cgi-bin \?
acl TOCACHE urlpath_regex -i \.htc$
acl TOCACHE urlpath_regex -i \.js$
acl TOCACHE urlpath_regex -i \.gif$
acl TOCACHE urlpath_regex -i \.jpe?g$
acl TOCACHE urlpath_regex -i \.png$
acl TOCACHE urlpath_regex -i \.css$

no_cache deny QUERY
no_cache deny !TOCACHE

which means (as I suppose): do not cache dynamic things, do not cache
things that are not pics, javascript files, stylesheets, etc.

2. In the section for refresh patterns I am doing:

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.htc$ 12 100% 12 override-expire override-lastmod
reload-into-ims ignore-reload
refresh_pattern -i \.js$ 12 100% 12 override-expire override-lastmod
reload-into-ims ignore-reload
refresh_pattern -i \.gif$ 12 100% 12 override-expire override-lastmod
reload-into-ims ignore-reload
refresh_pattern -i \.jpe?g$ 12 100% 12 override-expire override-lastmod
reload-into-ims ignore-reload
refresh_pattern -i \.png$ 12 100% 12 override-expire override-lastmod
reload-into-ims ignore-reload
refresh_pattern -i \.css$ 12 100% 12 override-expire override-lastmod
reload-into-ims ignore-reload
refresh_pattern . 0 20% 4320

Which means (as I suppose, apart from the default entries): pics, css-s,
js-s - should be cached for 12 minutes and be held and retrieved form
the cache for 12 minutes, regardless what the server and the client say
about the cacheability of the objects (I know this is breaking the HTTP
RFC-s, but this is fine as I consider to make the refresh patterns more
specific by adding the server ip and dns name in the regex).

What I hoped this configuration to achieve is that the static content
form the server should be explicitly cached after entering the squid
cache and held there for 12 minutes. Thus - only the dynamically
generated htmls would have to be transferred via the narrow line VPN.
However when tested with the client in my situation - Internet Explorer
6.0, the client renders the pages several (2-3) times more quickly when
the visualizations of pics is switched off.

I tried switching on the debugging information via:

debug_options 22,3

But the information in the log is not enough to decide what is going on
exactly:
2004/11/18 16:40:32| getMaxAge: 'http://server/images/paperclip.gif'
2004/11/18 16:40:32| getMaxAge: 'http://server/images/vatresh.gif'
2004/11/18 16:40:32| getMaxAge: 'http://server/images/f_op.gif'
2004/11/18 16:40:32| getMaxAge: 'http://server/images/zaved_da.gif'

I have not tested squid itself to be the narrow point, but I would think
this to be unlikely as the whole cacheable content is no more that 2MB
and I have tested with a single client. The machine running Squid is
good enough for the situation.

What am I missing in the big picture - how can I make the client render
the pages faster. (There is no issue with the pages themselves - when
viewed via LAN they show very quickly both via Squid and directly.)
Due to the particularity of the situation - enforcing the right solution
- proper configuration of both the server and the clients is impossible.
This is why I need enforcing caching via Squid.

Thanx in advance for reading the long letter.

Best regards:
al_shopov
Received on Thu Nov 18 2004 - 09:03:05 MST

This archive was generated by hypermail pre-2.1.9 : Wed Dec 01 2004 - 12:00:01 MST