scwanglijun / ehcache-spring-annotations

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

Cacheable annotation- One method calls another in the same DAO (target object) #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I have  CustomerDao   has two methods 

Object method A 

@Cacheble
Object method B 

Method a calls method which has caching.  Its not hitting cache at all instead 
its going to db. I have found the below information from documentation but 
whats the solution if my above methods to work? 
Should I fall back to  programmitic approach of ehcache?

Thanks

Self Invokation

Only external method calls coming in through the proxy are intercepted. This 
means that self-invocation, in effect, a method within the target object 
calling another method of the target object, will not lead to an actual cache 
interception at runtime even if the invoked method is marked with @Cacheable. 

Original issue reported on code.google.com by SHN...@gmail.com on 20 Jun 2011 at 6:15

GoogleCodeExporter commented 9 years ago
See Issue 64 for more details.

Original comment by eric.dalquist on 20 Jun 2011 at 7:35