qianjava / ehcache-spring-annotations

Automatically exported from code.google.com/p/ehcache-spring-annotations
0 stars 0 forks source link

Support concept of cache resolve #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a usecase where I want to "partition" the cache.
E.g. The name of the cache in @Cachable is fine, but I want the interceptor to 
call a CacheResolver class which resolves the end-cache name based on some 
other contectual metadata I provide through my application.

The usecase for this is that I want several cache instances which cache the 
same info, but several different instances to have an isolated instance for 
each of my customers (we have a multicustomer environement). This way I can 
size them suitable for each customer - but still keep my code/metainfo quite so 
clean.

Original issue reported on code.google.com by davidkar...@gmail.com on 1 Oct 2010 at 9:07

GoogleCodeExporter commented 8 years ago
Sounds like a great enhancement. Are you wanting to be able to define 
interceptors on the @Cachable annotation directly?

Original comment by eric.dalquist on 5 Oct 2010 at 4:06

GoogleCodeExporter commented 8 years ago
Not sure I follow.
What I though about was:
-add an annotation @CacheResolver which points to a "CacheLocator" or 
"CacheResolver" (like for keygenerators).
I then implement this class which it points to to return a Cache instance based 
on the metadata from the annotation + the contextual information which I can 
resolve off my current thread. A default implmentation of this (which would be 
the default value on the annotation) would be a simple implementation which 
simply returns the cache named by the @Cachable.

Original comment by davidkar...@gmail.com on 20 Oct 2010 at 12:56

GoogleCodeExporter commented 8 years ago
ping?

Original comment by davidkar...@gmail.com on 21 Oct 2010 at 11:24

GoogleCodeExporter commented 8 years ago

Original comment by eric.dalquist on 28 Oct 2010 at 2:43

GoogleCodeExporter commented 8 years ago

Original comment by eric.dalquist on 28 Oct 2010 at 2:43

GoogleCodeExporter commented 8 years ago
I just completed the cache resolver implementation in trunk. We'll try to have 
a 1.2 release within the next month.

Original comment by eric.dalquist on 20 Jan 2011 at 5:31

GoogleCodeExporter commented 8 years ago
Any news on the release?

Original comment by davidkar...@gmail.com on 23 Feb 2011 at 2:17

GoogleCodeExporter commented 8 years ago
Sorry, none yet. I'll see if I can carve out some time at work on Monday to get 
the 1.2 release out.

Original comment by eric.dalquist on 26 Feb 2011 at 5:32

GoogleCodeExporter commented 8 years ago

Original comment by eric.dalquist on 9 Mar 2011 at 5:24

GoogleCodeExporter commented 8 years ago
Hi, 

Any news on whether this is in a release?  We are looking for this exact 
functionality.

Original comment by george.p...@gmail.com on 15 Sep 2011 at 3:32