Re: adding content to the cache

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sun, 10 May 2009 16:26:02 +1200

Laurent Luce wrote:
> Actually, I am looking at a way of adding it directly to the squid cache. Basically, take the file and add it to the cache. I am looking into patching Squid to provide an API to do that. How complicated do you think it is if I want to add the file content along with the metadata directly into the cache ?
>

You mean like implementing a POST to the cache_object:// data space?

Adding stuff to the cache directories alone is fairly trivial. The
problem lies with the internal indexing structures of Squid, which
retain a mirror of the meta data plus additional data for memory
management. If they are not updated Squid is likely to overwrite the new
content at any time.

Alex is looking into storage improvement stuff at present (RockStore
feature in the wiki). I think getting in touch with him would be a
benefit to both of you and see about collaborating work.

Amos

>
> ----- Original Message ----
> From: Amos Jeffries <squid3_at_treenet.co.nz>
> To: Laurent Luce <laurentluce49_at_yahoo.com>
> Cc: squid-dev_at_squid-cache.org
> Sent: Friday, May 8, 2009 1:42:53 AM
> Subject: Re: adding content to the cache
>
> Laurent Luce wrote:
>> I am looking for a way to manually add content to the cache. Is there an API to do that ?
>>
>> For
>> example, I have the following file image.gif and I want to add it to
>> the proxy cache so it can be served from there when needed.
>>
>> Laurent
>>
>
> Not at present.
> You need to place it somewhere on a web server, assign it sufficient cache-control settings to store for a long while and then request it from squid.
>
> Common tools such as wget or squidclient can do that for you.
>
> Amos
> -- Please be using
> Current Stable Squid 2.7.STABLE6 or 3.0.STABLE15
> Current Beta Squid 3.1.0.7
>

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE15
   Current Beta Squid 3.1.0.7
Received on Sun May 10 2009 - 04:26:14 MDT

This archive was generated by hypermail 2.2.0 : Mon May 11 2009 - 12:00:02 MDT