Re: [squid-users] Re: Filemanager

From: Amos Jeffries <[email protected]>
Date: Thu, 18 Oct 2007 17:21:44 +1300 (NZDT)

> Hi!
>
>>Seeing as your system knows which file is now obsolete you can use any of
>> the the cache-manager systems to drop individual URI out of the cache.
>
> Well, do you know other cache managers than cachemgr.cgi? It would give
> more comfort to search not just for a spefific URI but also text inside
> html and so on like cachepurger can handle it. Strangely cachepurger says,
> that certain jpgs are in cache, but cachemgr doesn't list them!? :-(
>

I know of squidclient and cachemgr.cgi packaged with squid.
Also you are about the 3rd-4th person to write to users this year trying
to create their own custom manager for squid. Though the others have not
posted back with whether or not they succeeded.

Searching for text in stored objects is not presently possible.

>>Altering the cache directly is NOT recommended. Squid is not guaranteed
>> to use the same filing system in two given cache-dirs and not all squid
>> fs match OS fs. If a file is altered in-cache it may cause serious
>> problems.
>
> Hm, what problems could occur?

Cached objects are shared between RAM and HDD, with some not being on HDD
at all and sometimes only index records in RAM. Altering the HDD copy may
cause squid to return garbage based on the RAM index.
Also, I may be wrong but I believe COSS is similar to RAID-10, swapping
the RAM/HDD object content by stripped sectors. Altering anything in the
HDD copy could cause corruption when its later referenced in RAM.

>
>>'Locking' of files like that makes no sense in HTTP. Either a URI is
>> available or its dead. If you are really wanting an archive of old
>> content you should be looking elsewhere than the web proxy.
>>You're better off locking it on the origin server fs and following the
>> same procedure on the proxy as for changed files.
>
> I think I have trouble to understand that. "following the same procedure
> on the proxy" means to me, that I have to lock the files on the proxy -
> and this is exactly what I want. :-)

No I meant: lock on webserver, delete from proxy and make it fetch new
object next time its needed.

> But how do I achieve that? If I lock
> the file at the origin server (chmod), will these rights be forwarded to
> the proxy and it is locked, too?

Proxy knows nothing of 'rights'. It only knows whether it has an object or
needs to get a copy and where to ask for them.

> But what if I want a file to remain as
> fresh for 30 mins in the proxy cache, locking of file at origin starts
> after 10 mins. So for 20 mins the proxy won't recognize the change and the
> file is still accessible, which is not fine. :-)

The method of locking I suggested takes care of that. Along with every
other side-case the proxy may encounter.

Amos
Received on Wed Oct 17 2007 - 22:21:48 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:01 MDT