Re: [squid-users] Offline mode with a parent cache doesn't work

From: <londoner1_at_hushmail.com>
Date: Tue, 30 Jun 2009 09:32:02 +0100

On Fri, 26 Jun 2009 03:42:17 +0100 Amos Jeffries
<squid3_at_treenet.co.nz> wrote:
>londoner1_at_hushmail.com wrote:
>> On Thu, 25 Jun 2009 05:44:24 -0700 Amos Jeffries
>> <squid3_at_treenet.co.nz> wrote:
>>> londoner1_at_hushmail.com wrote:
>>>> Hi,
>>>>
>>>> I am trying to setup a local squid cache on my laptop so that
>I
>>> can
>>>> browse intranet pages when I am on a plane and don't have
>>> network
>>>> connection.
>>>>
>>>> I am therefore using the squid offline_toggle option via the
>>>> 'squid3client mgr:offline_toggle' command.
>>>>
>>>> However, I am finding that pages are not being cached when I
>>> have
>>>> my Office proxy set as a parent to my local one.
>>>>
>>>> I am running ubuntu hardy with squid 3 STABLE.1 ubuntu package
>
>>> on
>>>> my local machine, with a parent proxy set using the following
>>> lines
>>>> in my squid.conf:
>>>>
>>>> cache_peer proxy.nectech.co.uk parent 8080 0 no-query
>>>> prefer_direct off
>>>>
>>>> PS: The above two lines came from Squid wiki here:
>>>> http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid#head-
>>>> c050a0a0382c01fbfb9da7e9c18d58bafd4eb027
>>>>
>>>> My approach to test this is as follows:
>>>>
>>>> 1 Set firefox to my localhost:3128 proxy
>>>> 2 Start squid in online mode and browse to a website.
>>>> 3 Close firefox
>>>> 4 Set local squid into offline mode using 'squid3client
>>>> mgr:offline_toggle'
>>>> 5 Pull out the Network cable (to simulate being on a plane)
>>>> 6 Reopen firefox and browse to same site as in step 2.
>>>>
>>>> After step six, the page does not load and eventually times
>out.
>>>>
>>>> If i take out the parent cache lines, the offline mode will
>>> work.
>>>> Please can anyone help?
>>> 'offline_mode' means that Squid no longer attempts page
>validation
>>> and
>>> fetching of new pages. It does not means supplying content
>known
>>> to be
>>> past expiry.
>>
>> Hi Amos,
>>
>> Ok, please forgive me if I dont understand you correctly: you
>are
>> saying that the local squid cache is NOT returning me the page
>that
>> i previously went to a few minutes ago because it thinks it has
>> expired?
>
>Yes. From the info provided I believe that is what is happening.
>
>>
>> why would it be expired that quickly? and yet not be expired if
>my
>> local squid cache does not use the parent cache?
>
>HTTP contains things called If-Modified-Since requests. When squid
>
>thinks something is expired it either uses them or a new request
>to
>check for new content. Sometimes an IMS request sens back "no
>hasn't
>chaged" so Squid updates its information and sends you the object
>again.
>
>It's probably that the HTML part of the page has a short expiry
>time but
>does not actually change (ie a dynamically created page).
>
>Even if all the images etc on the page are available for months,
>without
>an HTML part to say how they are displayed the page wont show up.
>

Thanks Amos, I understand now.

>
>>
>> Also, a poster on the following blog mentioned that squid
>offline
>> mode ignores expiry data for cached items when in offline mode.
>Is
>> this not the case in latest squid 3 versions?
>>
>> http://people.w3.org/~dom/archives/2006/09/offline-web-cache-
>with-
>> squid/
>>
>> ps I appreciate your help on the subject.
>
>Mark who replied there and others have made a lot of improvements
>to the
>expiry and IMS sections of the latter Squid 2.6 releases and 2.7.
>
>The Squid-3 code in the same areas is a lot older with not all of
>their
>changes ported over. So I believe it would behave differently.
>Though
>I'm not fully clued up on the finer grains of whats going on
>there.

Ok, so I will try the latest stable 2.6 /2.7 builds on squid and
see what behaviour is in those builds.

Thanks for your help.

londoner1

>
>Amos
>--
>Please be using
> Current Stable Squid 2.7.STABLE6 or 3.0.STABLE16
> Current Beta Squid 3.1.0.8

--
Easy-to-use, advanced features, flexible phone systems.  Click here for more info.
 http://tagline.hushmail.com/fc/BLSrjkqmC5st0oAPQKnBr7VIGiuzxgDlzcAU23eNkHSF3JMG5yELn1NVDZe/
Received on Tue Jun 30 2009 - 08:32:08 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 30 2009 - 12:00:04 MDT