Rob van Maris wrote:
> I'm all in for a mayor overhaul of the caching code, but I would prefer
> this to be executed as a project that includes a major refactoring and
> redesign. Part of an improved design would be the use of interfaces and
> classfactories. At present caches are required to extend a specific
> baseclass which indicates bad design. A hack like you're proposing isn't
> adequate to adress this.


I think class-factories and interfaces are highly overrated concepts.

Actually my proposal will make two implementation layers which can be
implemented independentaly.

- The Cache extension
  This could add specific functionality like checking if class of the key.
  Or auto-invalidation on changes.

- The Map implementation
  Implements the map itself. E.g. LRUHastable.

The second one is currently not pluggable (because Cache extends
LRUHashtable rather then wrapping it), and only that I want to change now.

The extension of Cache can often be completely empty, or even anonymous
(you e.g. only specify a name and 'register' it). I don't really see the
point of making implementation more complex with factories, managers,
abstract implementations and what not, but anyhow I was not talking about
that, and I don't see it as a problem any way.

I find it a bit disappointing that you reject one thing because you seem to
dislike something else, and I'm getting a bit frustrated here, because there
is no cache project, I just want to make a simple, mimimal change to make
things better (and in my view good enough), but I'll have to do a complete
redesign in stead, and review any cache extension too..

Michiel


-- 
Michiel Meeuwissen                  mihxil'
Mediacentrum 140 H'sum                [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US




Reply via email to