Re: Database as proxy cache

On Thu, 31 Oct 1996 10:13:01 +0100 (MET) Anselm Baird_Smith 
<abaird@www43.inria.fr> wrote:

> 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?
> 
> I am not sure where you want to use a database ? Is it (a) for cached
> entries, or (b) for pages content.

For starters, I'm unsure what exactly is in the cached entries. Is it the 
basically just the metadata? What is the relationship between what is in 
CacheFilter and CachedResource? 

In any case I probably want to save (a) and (b) in my database.

> 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).

Well, I'll be using an OODB but I know about that part of things. Is there 
anything I should know about how to implement a ResourceStore that isn't 
mentioned in ResourceStore.java?

> 
> If (b), its even easier: each cached entries has a filename attribute
> giving the file where the content for that entry is stored.

Are you referring to the ATTR_FILE in CachedResource?

> 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.

Could I get some more specific guidance here? Do I need to define a new 
attribute type and create get and put methods for it? is there anything else 
I need to do? It looks like if I created streams for accessing and modifying 
the database then I could reuse a lot of the existing CachedResource code. 
Am I on the right track, or did you have something better in mind? 

Also, I'm confused by the the use of both the relationship of CachedResource 
and the jdbmResourceStore. Could someone explain this a little?

> 
> Does this helps ?

It does, but I might need a little more handholding because I'm not sure of 
the relationship of the various cache pieces and how they fit into the 
general Jigsaw framework.

-Mark

Received on Thursday, 31 October 1996 16:24:08 UTC