Re: read HTML text

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Mon, 24 Apr 2006 00:52:25 +0200

tor 2006-04-20 klockan 15:28 -0300 skrev wellington ricardo gasparin:

> Given the StoreEntry pointer for a cached object, how can I read its
> contents (HTML text)?

Depends on "who" you are and why.

Squid never (or almost never) keeps entire objects in memory. Instead
there is just what is currently needed to be sent to the clients. Also,
how this is done differs significantly between on-disk cache hits and
other requests.. (misses and memory hits have a lot in common however).

The official API for getting content out of a StoreEntry is the
undocumented storeclient API which primarily consists of

   storeClientRegister to register a new client of StoreEntry.

   storeClientCopy to request some data from the object

   storeUnregister to unregister to client from the StoreEntry.

client in this is "a internal reader of the StoreEntry", not neccesarily
a client of Squid..

But depending on "who" you are and why maybe this is not the interface
you are looking for. If you could tell a little more about what it is
you need to solve perhaps we can guide to a better place to get access
to the data you need.

Regards
Henrik

Received on Sun Apr 23 2006 - 16:52:39 MDT

This archive was generated by hypermail pre-2.1.9 : Mon May 01 2006 - 12:00:03 MDT