Search squid archive

Re: adding content to cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Squid indexes content by its URL, so in all honesty, the best way to get an object into squid's storage is to just request it through the proxy. This is easily scriptable via the curl and wget command-line tools, or frameworks like perl's LWP.

-C

On May 9, 2009, at 10:04 PM, 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 ?

Laurent



----- Original Message ----
From: Jeff Pang <pangj@xxxxxxxx>
To: Laurent Luce <laurentluce49@xxxxxxxxx>
Cc: squid-users@xxxxxxxxxxxxxxx
Sent: Monday, May 4, 2009 9:39:40 PM
Subject: Re:  adding content to cache

Laurent Luce:
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.


You could use a tool like wget to pass requests through Squid then the object will be cached if it is cachable. wget has some good arguments like "-p" or "-m" which even can be used to cache the whole site.

-- Jeff Pang
DingTong Technology
www.dtonenetworks.com



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux