Kees Jongenburger wrote:
> > > How about also removing the the caches creation to a factory
> > > CacheFactory.getCache(string name);
> > 
> > The static getCache method does not create a Cache, it only give one back
> > which was explicitely 'registered'. A better name would then perhaps be
> > CacheManager.
> And why would something like this belong somewhere in a baseclass?

I don't really understand what you ask. I followed your suggestion, I only
remarked that 'Factory' would be a bit of a misleading name here, because
currently the 'getCache' function doesn't factory anything.


[ .. static modifiers...].
> That of course is very confusing. not only when you extend a class.
> but even more
> in the factory code. 

I'm not sure if that is very confusing. Cache is quite a simple thing, with
only a few methods and even fewer static methods. Caches are instantiated
with a simple 'new', and can then staticly be 'registered', which makes them
configured by 'caches.xml'. Some cache-extensions are quite complicated, but
some others are extremely simple. 

I think is more or less a matter of taste wheter you implement static
functionality as static methods or by means of singleton 'factories' or
'managers' or so.


Michiel

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




Reply via email to