|
From: <jue...@we...> - 2004-09-21 08:43:23
|
Mike, =20 Well, if you'd like to get rid of the ehcache.xml file, we'd have to go = one 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 driving EHCache configuration from Spring (similar to our = LocalSessionFactoryBean does for Hibernate) would be. =20 Juergen =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 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 :) Cheers, Mike ATLASSIAN - http://www.atlassian.com 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 > ------------------------------------------------------- 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 |
|
From: <viv...@ya...> - 2004-09-24 00:04:07
|
And while we're at it, (unfortunately I'm not volunteering just yet), it would be nice to develop a set of interfaces in org.springframework.cache that can be implemented by other systems: ehcache, oscache, JCS. JSR 107 spells out what the interface would look like pretty clearly (http://jcp.org/aboutJava/communityprocess/jsr/cacheFS.pdf), but there are no standard implementations of this. Every implementation of the caching system seems to support it loosely, with common methods, but there is not a common interface, so users are always tied to one particular caching product. Spring has provided this kind of common interface for a number of other areas, and caching would be great to add to it. The jcache (jcache.sourceforge.net) project seems to stay closest to the original JSR. -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Mike Cannon-Brookes Sent: Thursday, September 23, 2004 2:53 To: spr...@li... Subject: Re: [Springframework-developer] EHCache support Dmitriy, This looks awesome to me - put it in the core! +1! I can feel a cachingSubsystemContext.xml coming on :) m On Wed, 22 Sep 2004 14:47:58 -0400, Dmitriy Kopylenko <dko...@ru...> wrote: > Mike, everyone, > > I've refined the EHCache support by allowing configuring named cache > regions via EhCacheManagerFactoryBean's properties and not requiring > ehcache.xml file anymore (if desired). > > The behavior is like this: > 1) configure EhCacheManagerFactoryBean with "configLocation" > (optional) If "configLocation" is not specified it creates a "blank" > CacheManager (with no caches defined). > 2) Configure any number of named Caches (providing cache name and > CacheManager as bean references) and optionally providing cache > properties (some or all or none - all the cache properties will have a > sensible default value) If the named cache is pre-configured in cache > config descriptor it will be used, ignoring any cache bean properties, > else the new Cache instance will be created and added to a > CacheManager for later retrieveval. Some config examples: > > <!-- Configure CacheManager from specified config location --> <bean > id="cacheManager" > class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> > <property > name="configLocation"><value>WEB-INF/ehcache.xml</value></property> > </bean> > > <!-- Configure myCache1 region overriding the default properties. If > myCache1 is found in ehcache.xml, the properties will be ignored --> > <bean id="myCache1" > class="org.springframework.cache.ehcache.EhCacheFactoryBean"> > <property name="cacheManager"><ref local="cacheManager"/></property> > <property name="cacheName"><value>myCache1</value></property> > <property name="maxElementsInMemory"><value>20000</value></property> > <property name="overflowToDisk"><value>true</value></property> > <property name="eternal"><value>false</value></property> > <property name="timeToLive"><value>600</value></property> > <property name="timeToIdle"><value>500</value></property> > </bean> > > <!-- Configure myCache2 region overriding maxElementsInMemory property. > If myCache2 is found in ehcache.xml, the properties will be ignored > --> <bean id="myCache3" > class="org.springframework.cache.ehcache.EhCacheFactoryBean"> > <property name="cacheManager"><ref local="cacheManager"/></property> > <property name="cacheName"><value>myCache2</value></property> > <property > name="maxElementsInMemory"><value>1230000</value></property> > </bean> > > The default properties are: > - maxElementsInMemory: 10000 > - overflowToDisk: true > - eternal: false > - timeToLive: 120 > - timeToIdle: 120 > > Does this cover basic use cases? If so, I'll be happy to commit this > to the main source tree before 1.1.1 Let me know. > > Regards, > Dmitriy. > > > > > Mike Cannon-Brookes wrote: > > >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. > > > >In code, this is easy to do: > > > >Cache cache = 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ürgen höller [ werk3AT ] > ><jue...@we...> wrote: > > > > > >>Mike, > >> > >>Well, if you'd like to get rid of the ehcache.xml file, we'd have to go one 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 driving EHCache configuration from Spring (similar to our LocalSessionFactoryBean does for Hibernate) would be. > >> > >>Juergen > >> > >>________________________________ > >> > >>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 > >> > >> > >> > >> > >>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 :) > >> > >>Cheers, > >>Mike > >> > >>ATLASSIAN - http://www.atlassian.com > >> > >>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-develo > >>>per > >>> > >>> > >>> > >>------------------------------------------------------- > >>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-develop > >>er > >> > >> > >> > >> > >>------------------------------------------------------- > >>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-develop > >>er > >> > >> > >> > > > > > >------------------------------------------------------- > > > >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-develope > >r > > > > > > ------------------------------------------------------- > 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 > -- ATLASSIAN - http://www.atlassian.com ------------------------------------------------------- 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 __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail |
|
From: March, A. <am...@so...> - 2004-09-28 20:05:00
|
Don't know when the release is scheduled but do I have time to add the = OSCache equivalents of these classes? > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On = Behalf > Of j=FCrgen h=F6ller [werk3AT] > Sent: Tuesday, September 28, 2004 2:41 AM > To: spr...@li... > Subject: [Springframework-developer] EHCache support >=20 > Dmitriy, everybody, >=20 > I've just fine-tuned EhCacheManagerFactoryBean and EhCacheFactoryBean = a > bit: In particular, the latter uses CacheManager.getInstance() and/or = its > bean name as defaults for "cacheManager" respectively "cacheName". >=20 > Furthermore, I've upgraded to the just released EHCache 1.0 final = (good > timing there!), and added support for the new "diskPersistent" flag = and > "diskExpiryThreadIntervalSeconds" setting. >=20 > Note that there's a separate "ehcache" subdirectory in our "lib" = directory > now: Dear Eclipse users, please check your classpath :-) >=20 > Juergen >=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 |
|
From: Dmitriy K. <dko...@ru...> - 2004-09-28 20:31:23
|
You could send them to me, I will check them into the sandbox, then we review/collaborate and see if they could make 1.1.2 (mid November) 1.1.1 is scheduled for release tonight. Regards, Dmitriy. March, Andres wrote: >Don't know when the release is scheduled but do I have time to add the OSCache equivalents of these classes? > > > >>-----Original Message----- >>From: spr...@li... >>[mailto:spr...@li...] On Behalf >>Of jürgen höller [werk3AT] >>Sent: Tuesday, September 28, 2004 2:41 AM >>To: spr...@li... >>Subject: [Springframework-developer] EHCache support >> >>Dmitriy, everybody, >> >>I've just fine-tuned EhCacheManagerFactoryBean and EhCacheFactoryBean a >>bit: In particular, the latter uses CacheManager.getInstance() and/or its >>bean name as defaults for "cacheManager" respectively "cacheName". >> >>Furthermore, I've upgraded to the just released EHCache 1.0 final (good >>timing there!), and added support for the new "diskPersistent" flag and >>"diskExpiryThreadIntervalSeconds" setting. >> >>Note that there's a separate "ehcache" subdirectory in our "lib" directory >>now: Dear Eclipse users, please check your classpath :-) >> >>Juergen >> >> >>------------------------------------------------------- >>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 >> >> > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |
|
From: March, A. <am...@so...> - 2004-09-28 21:02:49
|
Sounds good. I will get them to you as soon as possible. Thanks. > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On = Behalf > Of Dmitriy Kopylenko > Sent: Tuesday, September 28, 2004 1:33 PM > To: spr...@li... > Subject: Re: [Springframework-developer] EHCache support >=20 > You could send them to me, I will check them into the sandbox, then we > review/collaborate and see if they could make 1.1.2 (mid November) >=20 > 1.1.1 is scheduled for release tonight. >=20 > Regards, > Dmitriy. >=20 >=20 > March, Andres wrote: >=20 > >Don't know when the release is scheduled but do I have time to add = the > OSCache equivalents of these classes? > > > > > > > >>-----Original Message----- > >>From: spr...@li... > >>[mailto:spr...@li...] On = Behalf > >>Of j=FCrgen h=F6ller [werk3AT] > >>Sent: Tuesday, September 28, 2004 2:41 AM > >>To: spr...@li... > >>Subject: [Springframework-developer] EHCache support > >> > >>Dmitriy, everybody, > >> > >>I've just fine-tuned EhCacheManagerFactoryBean and = EhCacheFactoryBean a > >>bit: In particular, the latter uses CacheManager.getInstance() = and/or > its > >>bean name as defaults for "cacheManager" respectively "cacheName". > >> > >>Furthermore, I've upgraded to the just released EHCache 1.0 final = (good > >>timing there!), and added support for the new "diskPersistent" flag = and > >>"diskExpiryThreadIntervalSeconds" setting. > >> > >>Note that there's a separate "ehcache" subdirectory in our "lib" > directory > >>now: Dear Eclipse users, please check your classpath :-) > >> > >>Juergen > >> > >> > >>------------------------------------------------------- > >>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 > >> > >> > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: IT Product Guide on = ITManagersJournal > >Use IT products in your business? Tell us what you think of them. = Give us > >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find = out > more > >http://productguide.itmanagersjournal.com/guidepromo.tmpl > >_______________________________________________ > >Springframework-developer mailing list > >Spr...@li... > = >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on = ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give = us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-09-29 05:55:05
|
Actually, the 1.1.1 release is not gonna happen before tonight. = Nevertheless, further cache support etc will have to be deferred till = 1.1.2, which is scheduled for early November (mid November at the = latest). =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Dmitriy Kopylenko Gesendet: Di 28.09.2004 22:33 An: spr...@li... Betreff: Re: [Springframework-developer] EHCache support You could send them to me, I will check them into the sandbox, then we review/collaborate and see if they could make 1.1.2 (mid November) 1.1.1 is scheduled for release tonight. Regards, Dmitriy. March, Andres wrote: >Don't know when the release is scheduled but do I have time to add the = OSCache equivalents of these classes? > >=20 > >>-----Original Message----- >>From: spr...@li... >>[mailto:spr...@li...] On = Behalf >>Of j=FCrgen h=F6ller [werk3AT] >>Sent: Tuesday, September 28, 2004 2:41 AM >>To: spr...@li... >>Subject: [Springframework-developer] EHCache support >> >>Dmitriy, everybody, >> >>I've just fine-tuned EhCacheManagerFactoryBean and EhCacheFactoryBean = a >>bit: In particular, the latter uses CacheManager.getInstance() and/or = its >>bean name as defaults for "cacheManager" respectively "cacheName". >> >>Furthermore, I've upgraded to the just released EHCache 1.0 final = (good >>timing there!), and added support for the new "diskPersistent" flag = and >>"diskExpiryThreadIntervalSeconds" setting. >> >>Note that there's a separate "ehcache" subdirectory in our "lib" = directory >>now: Dear Eclipse users, please check your classpath :-) >> >>Juergen >> >> >>------------------------------------------------------- >>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 >> > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on = ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give = us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out = more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 > ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give = us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out = more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
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
>
|
|
From: Dmitriy K. <dko...@ru...> - 2004-09-22 18:46:20
|
Mike, everyone,
I've refined the EHCache support by allowing configuring named cache
regions via EhCacheManagerFactoryBean's properties and not requiring
ehcache.xml file anymore (if desired).
The behavior is like this:
1) configure EhCacheManagerFactoryBean with "configLocation" (optional)
If "configLocation" is not specified it creates a "blank" CacheManager
(with no caches defined).
2) Configure any number of named Caches (providing cache name and
CacheManager as bean references) and optionally providing cache
properties (some or all or none - all the cache properties will have a
sensible default value) If the named cache is pre-configured in cache
config descriptor it will be used, ignoring any cache bean properties,
else the new Cache instance will be created and added to a CacheManager
for later retrieveval. Some config examples:
<!-- Configure CacheManager from specified config location -->
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property
name="configLocation"><value>WEB-INF/ehcache.xml</value></property>
</bean>
<!-- Configure myCache1 region overriding the default properties. If
myCache1 is found in ehcache.xml, the properties will be ignored -->
<bean id="myCache1"
class="org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name="cacheManager"><ref local="cacheManager"/></property>
<property name="cacheName"><value>myCache1</value></property>
<property name="maxElementsInMemory"><value>20000</value></property>
<property name="overflowToDisk"><value>true</value></property>
<property name="eternal"><value>false</value></property>
<property name="timeToLive"><value>600</value></property>
<property name="timeToIdle"><value>500</value></property>
</bean>
<!-- Configure myCache2 region overriding maxElementsInMemory property.
If myCache2 is found in ehcache.xml, the properties will be ignored -->
<bean id="myCache3"
class="org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name="cacheManager"><ref local="cacheManager"/></property>
<property name="cacheName"><value>myCache2</value></property>
<property
name="maxElementsInMemory"><value>1230000</value></property>
</bean>
The default properties are:
- maxElementsInMemory: 10000
- overflowToDisk: true
- eternal: false
- timeToLive: 120
- timeToIdle: 120
Does this cover basic use cases? If so, I'll be happy to commit this to
the main source tree before 1.1.1 Let me know.
Regards,
Dmitriy.
Mike Cannon-Brookes wrote:
>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.
>
>In code, this is easy to do:
>
>Cache cache = 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ürgen höller [ werk3AT ]
><jue...@we...> wrote:
>
>
>>Mike,
>>
>>Well, if you'd like to get rid of the ehcache.xml file, we'd have to go one 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 driving EHCache configuration from Spring (similar to our LocalSessionFactoryBean does for Hibernate) would be.
>>
>>Juergen
>>
>>________________________________
>>
>>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
>>
>>
>>
>>
>>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 :)
>>
>>Cheers,
>>Mike
>>
>>ATLASSIAN - http://www.atlassian.com
>>
>>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
>>>
>>>
>>>
>>-------------------------------------------------------
>>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
>>
>>
>>
>>
>>-------------------------------------------------------
>>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
>>
>>
>>
>
>
>-------------------------------------------------------
>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
>
>
|
|
From: Mike Cannon-B. <mca...@gm...> - 2004-09-23 06:53:31
|
Dmitriy,
This looks awesome to me - put it in the core! +1!=20
I can feel a cachingSubsystemContext.xml coming on :)
m
On Wed, 22 Sep 2004 14:47:58 -0400, Dmitriy Kopylenko
<dko...@ru...> wrote:
> Mike, everyone,
>=20
> I've refined the EHCache support by allowing configuring named cache
> regions via EhCacheManagerFactoryBean's properties and not requiring
> ehcache.xml file anymore (if desired).
>=20
> The behavior is like this:
> 1) configure EhCacheManagerFactoryBean with "configLocation" (optional)
> If "configLocation" is not specified it creates a "blank" CacheManager
> (with no caches defined).
> 2) Configure any number of named Caches (providing cache name and
> CacheManager as bean references) and optionally providing cache
> properties (some or all or none - all the cache properties will have a
> sensible default value) If the named cache is pre-configured in cache
> config descriptor it will be used, ignoring any cache bean properties,
> else the new Cache instance will be created and added to a CacheManager
> for later retrieveval. Some config examples:
>=20
> <!-- Configure CacheManager from specified config location -->
> <bean id=3D"cacheManager"
> class=3D"org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
> <property
> name=3D"configLocation"><value>WEB-INF/ehcache.xml</value></property>
> </bean>
>=20
> <!-- Configure myCache1 region overriding the default properties. If
> myCache1 is found in ehcache.xml, the properties will be ignored -->
> <bean id=3D"myCache1"
> class=3D"org.springframework.cache.ehcache.EhCacheFactoryBean">
> <property name=3D"cacheManager"><ref local=3D"cacheManager"/></pr=
operty>
> <property name=3D"cacheName"><value>myCache1</value></property>
> <property name=3D"maxElementsInMemory"><value>20000</value></prop=
erty>
> <property name=3D"overflowToDisk"><value>true</value></property>
> <property name=3D"eternal"><value>false</value></property>
> <property name=3D"timeToLive"><value>600</value></property>
> <property name=3D"timeToIdle"><value>500</value></property>
> </bean>
>=20
> <!-- Configure myCache2 region overriding maxElementsInMemory property.
> If myCache2 is found in ehcache.xml, the properties will be ignored -->
> <bean id=3D"myCache3"
> class=3D"org.springframework.cache.ehcache.EhCacheFactoryBean">
> <property name=3D"cacheManager"><ref local=3D"cacheManager"/></pr=
operty>
> <property name=3D"cacheName"><value>myCache2</value></property>
> <property
> name=3D"maxElementsInMemory"><value>1230000</value></property>
> </bean>
>=20
> The default properties are:
> - maxElementsInMemory: 10000
> - overflowToDisk: true
> - eternal: false
> - timeToLive: 120
> - timeToIdle: 120
>=20
> Does this cover basic use cases? If so, I'll be happy to commit this to
> the main source tree before 1.1.1 Let me know.
>=20
> Regards,
> Dmitriy.
>=20
>=20
>=20
>=20
> Mike Cannon-Brookes wrote:
>=20
> >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.
> >
> >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,
> >>
> >>Well, if you'd like to get rid of the ehcache.xml file, we'd have to go=
one step further: The current support classes for EHCache "just" specify t=
he location of the ehcache.xml file in Spring config, and allow to pass Cac=
he references around via IoC. We need to check how much effort completely d=
riving EHCache configuration from Spring (similar to our LocalSessionFactor=
yBean does for Hibernate) would be.
> >>
> >>Juergen
> >>
> >>________________________________
> >>
> >>From: spr...@li... on behalf o=
f Mike Cannon-Brookes
> >>Sent: Tue 21/09/2004 07:00
> >>To: spr...@li...
> >>Subject: Re: [Springframework-developer] EHCache support
> >>
> >>
> >>
> >>
> >>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 :)
> >>
> >>Cheers,
> >>Mike
> >>
> >>ATLASSIAN - http://www.atlassian.com
> >>
> >>On Sun, 19 Sep 2004 11:27:54 -0500, Dmitriy Kopylenko
> >><dko...@ru...> wrote:
> >>
> >>
> >>>I've added "org.springframework.cache.ehcache.EhCacheManagerFactoryBea=
n"
> >>>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 the=
y
> >>>live. Is "org.springframework.cache" top level package appropriate wit=
h
> >>>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 o=
n
> >>>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
> >>>
> >>>
> >>>
> >>-------------------------------------------------------
> >>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
> >>
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>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
> -------------------------------------------------------
> 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
ATLASSIAN - http://www.atlassian.com
|