Tie up between CacheFilter and CachedResource

Hi,

I am trying to re-use Jigsaw's Client side caching mechanism (and code) and have
hit a block.

Basically I am trying to use Jigsaw's caching mechanism from a seperate
filter(which implements PropRequestFilter ). i.e I want to set-up my own cache
which has very different properties requirements from the default CacheFilter
cache. However,storage and retrieval of objects to & from this cache can be same
as CacheFilter..

Everything went well except for the fact that  there is a very strong tie-up
between a  CachedResource Object and the CacheFilter Object.

A CachedResource (and VaryCachedResource) expect an object of type CacheFilter
in their constructor.
>>   CachedResource(CacheFilter filter, Request request, Reply reply)
 >>throws IOException  (from CachedResource.java)

I am quite puzzled by this strong tie-up. There are about half-a-dozen functions
that CachedResource needs access to through CacheFilter and all these could
easily be made into an interface. This will enable anybody(who implements the
Interface) to use CachedResource and the caching storage & retrieval mechanism
can be made completely re-usable.

Are there any architectural issues why the implementation is done in this
particular manner? (or was it just lack of time :-))

An explanation on this would be useful....!

Thanks in advance!


--
Mahesh Joshi

---------------------------------------------------------------
Mahesh Joshi                      {O} 415-254-5441
KnowledgeSet Corp.                {H} 510-792-3955
                  mjoshi@kset.com
----------------------------------------------------------------

Received on Monday, 18 August 1997 04:36:02 UTC