The cache annotations are definitely usable, and it would also be great to be able to inject cache instances into resource producers, so you can then alias them to a typesafe injection elsewhere. We did this for Infinispan, but that is just an Infinispan impl, not a general impl.
On 8 Dec 2012, at 16:03, Adrian Gonzalez wrote: > Hello, > > Looks interesting, but why don't you use JCache CDI annotations as mentioned > in [1] ? > > I know that JCache isn't finished yet, but I think it's already usable. > I'm using them in a sample app and it works great with ehcache impl (using > 0.4 version). > > Perhaps I've missed something though. > If not, aren't we going to duplicate standard > javax.cache.interceptor.CacheResult annotation with > org.apache.deltaspike.cache.api.Cacheable ? > > [1] http://java.dzone.com/articles/using-cdi-access-infinispan > > Extract from [1] : > @CacheResult(cacheName="user-cache") public User findUser(long id) { User > user = …; // retrieve the user with the given id return user; } > > ________________________________ > De : Harald Wellmann <[email protected]> > À : [email protected] > Envoyé le : Samedi 8 décembre 2012 15h57 > Objet : Cache module > > I've started working on what might become a new DeltaSpike module for > caching, see https://issues.apache.org/jira/browse/DELTASPIKE-282. > > The sources are at > https://github.com/hwellmann/incubator-deltaspike/tree/hwellmann/deltaspike/modules/cache > > If you think this is useful, please let me know what it takes to get this > stuff into DeltaSpike. > > Best regards, > Harald
