Re: [squid-users] Store object length

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 26 Feb 2013 00:45:02 +1300

This is a code question. Please followup on squid-dev mailing list. The
developers can help you more with this than the Squid users can.

On 25/02/2013 8:00 p.m., anita wrote:
> Hi All,
>
> I am trying to write an API that will fetch objects from the squid cache
> given the url and http method.
> When I analyzed the code, I found that this can be achieved with a
> storeGetPublic(url, http_method) to see if the url has an entry in the
> cache.
> This followed by storeClientCopy() call.
> However, the StoreIOBuffer used here has been initialized with a lenght of
> HTTP_REQBUF_SZ (4096 or 4 k) by default.

Err. Yes storeGetPublic() is the API to do this with.

Why are you writing a new one? what are you trying to do with Squid?

> I would like to know how larger objects are stored and retrieved from cache
> ? How can I determine the length of the object read in that case?
>
> Version used: Squid ver 3.1.16
> squid.conf : default configuration file with cache_dir directive
> uncommented.
>
> Any pointers are appreciated.

When playing with the Squid code please always upgrade to the most
recent you can before starting. Preferrably that would be 3.HEAD which
is our rolling development version.
3.1 Squid series has been officially deprecated for about five months
now, and even 3.2 is nearing end of life.

The Squid-3 series is one very long process of converting the code from
C code constructs to C++ objects APIs and pluggable mechanisms. So you
may find it much easier to code later releases, or that your fix has
already been done.

Amos
Received on Mon Feb 25 2013 - 11:45:18 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 27 2013 - 12:00:05 MST