W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1997

Tie up between CacheFilter and CachedResource

From: Mahesh Joshi <mjoshi@kset.com>
Date: Mon, 18 Aug 1997 01:37:52 -0700
Message-Id: <33F809E0.7D0062A1@kset.com>
To: Jigsaw Mailing List <www-jigsaw@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT