google-code-export / ehcache-spring-annotations

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

annotate ,to load a cacheble method during application startup. #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I'm supply @postcontruct java annotation to the DAO method that is also 
annotated as @cacheble.Even though the postcostruct gets fired.the method 
result is not cached.

Original issue reported on code.google.com by var...@gmail.com on 13 Oct 2010 at 9:42

GoogleCodeExporter commented 9 years ago
I believe @PostConstruct is called directly on the bean instance by the spring 
application context itself. Spring then adds the bean proxy wrapper which 
applies the caching.

In short I don't believe things using @PostConstruct, or InitializingBean can 
be cached in Spring. This is due to Spring's architecture, there is nothing we 
can do in our library to address it.

Original comment by eric.dalquist on 25 Oct 2010 at 4:39