Re: [squid-users] Successfully change the content of an object. But ...

From: Squid Support (Henrik Nordstrom) <hno@dont-contact.us>
Date: Tue, 14 May 2002 13:38:20 +0200

maer727@sohu.com wrote:
> IMHO, there are two major ways to change the content of
> the cache. Using the redirector or writing a program to
> change the content of the cached object directly.

Changing the cached objects directly on disk in the way you propose IS NOT
SUPPORTED AND WILL NEVER BE SUPPORTED. Any content transformation MUST be
done in close interaction with Squid.

> I choose the latter method because I think the latter is more
> efficient. Another reason I think when using redirector I need
> additional work to deal with digital signature of the cached object.
> Maybe it will be a hard work to me. :-)

Using a redirector is trivial if you can identify the objects you need to
replace by their URL.

If you need to look into the actual content of the object to know, then some
form of content transformation will be needed. You have been given several
valid approaches to this.

> I successfully change the content of one cached object (a .gif) but I meet
> a trouble. I write a program whose main procedures are the following,
>
> 1. shutdown squid
> 2. search and modify the cached .gif
> 3. restart squid
>
> I notice when I just do the procedure 2, the .gif will not be changed.
> It really puzzled me a lot. I do not know why. I want to find a way to
> modify the content of the .gif directly without "shutdown" and "restart"
> squid. Do you have some suggestions?

By asking Squid to modify the object, and implementing the needed support to
do so in Squid. There is several ongoing tasks in this direction on
devel.squid-cache.org. See the branches "Transfer Encoding", "Content
Processing" and "ICAP Client Support".

You ARE NOT ALLOWED to rewrite the cache files manually outside of the Squid
store routines. Only Squid should ever modify cache files.

-- 
Basic free Squid support provided thanks to MARA Systems AB
Your source of advanced reverse proxy solutions or customized
Squid solutions. http://www.marasystems.com/products/
Received on Tue May 14 2002 - 05:38:30 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:08:06 MST