Re: Access to cached object

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 25 Aug 2004 20:12:21 +0200 (CEST)

On Wed, 25 Aug 2004, Chua Chee How wrote:

> Just to clarify, clientProcessRequest2() from
> client_side.c calls the method to retrieve the cached
> object is that right?

Not really. It gets a handle to the cached object and then determines if
this is valid to send in response to the request.

> To my interpretation, the object (Web page or image)
> is stored as the struct StoreEntry right?

This is the object identity yes. The data is not there but retreiveable
using the store functions by knowing the StoreEntry. The data may be on
disk or in memory (or both, or combination thereof).

> What I can't comprehend is, where is the pointer to the actual object?
> I'm asking because I need access to the cached object to determine its
> type (.htm or .jpg etc.)

For this you need to read the object headers by first creating a store
client by calling storeClientListAdd and then read data from there with
storeClientCopy, or just hook into the client reply processing after the
reply headers have been read. See clientSendMoreData.

Regards
Henrik
Received on Wed Aug 25 2004 - 12:12:23 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Sep 01 2004 - 12:00:04 MDT