google-code-export / ehcache-spring-annotations

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

Multiple CacheManagers #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have an application that has 2 separate CacheManagers and am looking for a 
way where the @Cacheable annotation can be used to operate over both caches.  I 
assume something would need to be provided in the @Cacheable annotation that 
specified which CacheManager would be used for that method?

Original issue reported on code.google.com by mikeboy...@gmail.com on 14 Jan 2011 at 9:51

GoogleCodeExporter commented 9 years ago
We're working on extending the API to allow for a plugable cache resolution 
interface. This should be able to meet your need by allowing you to write a 
custom resolver that understood how to find the right cache for the cache name.

For example you could create a resolver that when giving 
@Cacheable(cacheName="manager1|myCache") knows to look in the CacheManager 
named manager1 for the cache myCache.

I'll leave this issue open until the resolution code is in place for you to 
review.

Original comment by eric.dalquist on 18 Jan 2011 at 3:59

GoogleCodeExporter commented 9 years ago
Yes, the proposed solution sounds good.  Thanks!

Original comment by mikeboy...@gmail.com on 25 Jan 2011 at 8:12

GoogleCodeExporter commented 9 years ago
Marking duplicate since this is resolved by Issue 49 which was included in the 
1.1.3 release.

Original comment by eric.dalquist on 19 Apr 2011 at 10:32