Re: [squid-users] Re: how to use refresh_pattern correct

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 30 Apr 2014 01:08:40 +1200

On 29/04/2014 6:51 p.m., tile1893 wrote:
> Good morning :)
>
> thanks for all your posts!!
>
> some more informations: Im trying to set up a router with openwrt and a
> USB-umts-stick, so that i got a "mobile access point". Dont ask why, I just
> have to do it ;) The USB-Stick is not installed yet, right now i'm online
> over LAN/WLAN.
>
> While I'm connected to the Internet and browse for example www.amazon.com or
> www.squid-cache.org I got no problems, but later If my connection is lost
> and I call www.amazon.com this request should be load from the cache. (Is
> this even possible with squid?!)

You can configure the (very badly named) "offline_mode" setting to "on".

What that will do is aggressively cache everything no matter how stale
or old. Note that this takes a fair amount of cache space, unless this
proxy is for personal use its unlikely that 300MB is going to be enough
and possibly not even then (its only a few thousand "pages").
 It was primarily intended for use in reverse-proxies as preparation for
a maintenance outage of the backend web server.

Even wth that what you ask is still not entirely possible for most of
todays Internet websites. Almost all of them require some form of
dynamic/live operation to work properly. What I would expect to see when
offline and fetching solely from the proxy cache is that many pages
appear blank, and they do show up have a mix of missing styles, broken
links, non-working "clickables", and some empty sections of display.

> Some websites work like this, but some doesnt. I think some are not
> cacheable because of the different flags in the header and I thought that I
> could ignore this flags by defining some refresh_pattern.
>
> Im using suqid 3.4.
>
> some config parameters:
>
> cache_mem 8 MB
> maximum_object_size 65536 KB
> mimimum_object_size_in_memory 0 KB
> maximum_object_size_in_memory 32 KB
> cache_dir ufs /opt/proxyCache 300 16 256
>

Amos
Received on Tue Apr 29 2014 - 13:08:45 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 29 2014 - 12:00:07 MDT