|
From: Mike Cannon-B. <mca...@gm...> - 2004-09-22 02:08:24
|
Mate,
I just looked at the code Dmitriy has written, and from my knowledge
of EHCache (incidentally often referred to as Canadian cache in the
office, or just "cache, eh?") it would be completely trivial (ie a 2
minute task :)) to add this?
The EhCacheManagerFactoryBean already does not require an ehcache.xml
file, it will use one if provided with one - otherwise it will just
create a blank CacheManager. So this part works fine.
The only thing to add would be a way to create new caches.=20
In code, this is easy to do:
Cache cache =3D new Cache("MyCache", 1000, true, false, 500, 200);
manager.addCache(cache);
There are only 6 properties for every cache (as above - cache name,
max size, overflow to disk, eternal, time to live and time to idle).
Why not just add these as setters to EhCacheFactoryBean, and have that
create the cache and register it with the referenced CacheManager?
What else would be required?
Cheers,
Mike
ATLASSIAN - http://www.atlassian.com
On Tue, 21 Sep 2004 10:40:34 +0200, j=FCrgen h=F6ller [ werk3AT ]
<jue...@we...> wrote:
> Mike,
>=20
> Well, if you'd like to get rid of the ehcache.xml file, we'd have to go o=
ne step further: The current support classes for EHCache "just" specify the=
location of the ehcache.xml file in Spring config, and allow to pass Cache=
references around via IoC. We need to check how much effort completely dri=
ving EHCache configuration from Spring (similar to our LocalSessionFactoryB=
ean does for Hibernate) would be.
>=20
> Juergen
>=20
> ________________________________
>=20
> From: spr...@li... on behalf of =
Mike Cannon-Brookes
> Sent: Tue 21/09/2004 07:00
> To: spr...@li...
> Subject: Re: [Springframework-developer] EHCache support
>=20
>=20
>=20
>=20
> Woo - this would be really cool. It would enable us to get rid of
> another config file from Confluence, replacing it with yet another
> Spring context file :)
>=20
> Cheers,
> Mike
>=20
> ATLASSIAN - http://www.atlassian.com
>=20
> On Sun, 19 Sep 2004 11:27:54 -0500, Dmitriy Kopylenko
> <dko...@ru...> wrote:
> > I've added "org.springframework.cache.ehcache.EhCacheManagerFactoryBean=
"
> > and "org.springframework.cache.ehcache.EhCacheFactoryBean" to the
> > sandbox. Please take a look at it with any suggestions and/or comments.
> > Now, if we would provide such caching support classes, where would they
> > live. Is "org.springframework.cache" top level package appropriate with
> > sub packages for different caching subsystems i.e "ehcache", "oscache",
> > etc.? If we all agree on the package for caching support classes,
> > EHCache factory beans might make 1.1.1
> >
> > Regards,
> > Dmitriy.
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> > Project Admins to receive an Apple iPod Mini FREE for your judgement on
> > who ports your project to Linux PPC the best. Sponsored by IBM.
> > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> > _______________________________________________
> > Springframework-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springframework-developer
> >
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|