Database as proxy cache

Mark Friedman writes:
 > I wonder if I could get some specific details on how I could extend (or 
 > change) Jigsaw to enable the proxy cache pages to be cached in a database?

Right now the w3c.www.protocols.http.cache.CacheFilter uses a
jdbmResourceStore (unfortunately in that same package) to keep track
of cached entries, and then the file system to cache the pages content.

I am not sure where you want to use a database ? Is it (a) for cached
entries, or (b) for pages content.

If (a) the best way is to write a resource store implementation that
uses jdbc to connect to a database (check the
w3c.jigsaw.resources.ResourceStore interface).

If (b), its even easier: each cached entries has a filename attribute
giving the file where the content for that entry is stored. You need
to change that to some ref into your database of the content, and then
change slightly the CachedResource class to fetch the content from the
db instead of a file.

Does this helps ?
Anselm.

Received on Thursday, 31 October 1996 04:13:15 UTC