On 16 Dec 2002 21:25:15 +1100
Robert Collins <robertc@squid-cache.org> wrote:
> > Hello, all developers,
> >
> > I'm only attempting to add a simple function to my Squid
> > to fetch an object from web server but with no need
> > to send it back to any client. I used the code as below:
> >
> > fetch_r = urlParse(METHOD_GET, url);
> > flags = null_request_flags;
> > flags.cachable = 1;
> > flags.proxy_keepalive = 1;
> > fetch_e = storeCreateEntry(url, url, flags, METHOD_GET);
> > fwdStart(-1, fetch_e, fetch_r);
> >
> > Objects are successfully fetched and saved to local cache.
> > But after running for a long time, Squid complains that
> > disk space is over limit, in that it seems that the objects
> > fetched cannot be purged. Can anyone please give some hint?
>
> Hmm, possibly you have the object still open. You might look at the ESI
> clientStreams code in squid-3, which has a similar requirement, but does
> not hit the issue you describe.
>
> Cheers,
> Rob
Thanks' You are right.
Even though I do not need to call storeClientCopy for any callback function,
it's still necessary to unlock the StoreEntry. Because there's a
storeLockObject() in the storeCreateEntry().
I just add a new flag to StoreEntry, check the flag and do unlock in
storeComplete.
Tiancheng Hu
Kanazawa Institute of Technology, Japan.
Received on Tue Dec 17 2002 - 10:10:45 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:01 MST