Spring ehcache integration with self-propagating cache scope

I need to integrate spring and ehcache and try to implement it with blockingCache pattern

<ehcache:annotation-driven/>

There is one parameter for self-populating-cache-scope for shared (default) and method . Could you explain what the difference is?

There is also an @Cacheable annotation with the selfPopulating flag

According to what I read on some post

http://groups.google.com/group/ehcache-spring-annotations/browse_thread/thread/7dbc71ce34f6ee19/b057610167dfb815?lnk=raot

he says that when a shared one is used , only one instance is created , and it is used every time the same cache name is used, so if I use selfPopulating as true for one method,

all threads trying to access other methods annotated using @Cacheable with the selfPopulating flag set to true will be suspended, which I don’t want

<ehcache:annotation-driven/>

when self-populating-cache-scope = method creates other separate instances for all methods annotated using @Cacheable with the selfPopulating flag set to true, t create a problem.

, @TriggerRemove , @Cacheable, , ? ?

+3
1

google ehcache

Ehcache. selfPopulating = true, SelfPopulatingCache .

cache-scope = shared, , , SelfPopulatingCache. cache-scope = method then

, SelfPopulatingCache , , (-)

, SelfPopulatingCache BlockingCache , ehcache . http://ehcache.org/apidocs/net/sf/ehcache/constructs/blocking/BlockingCache.html

+1

All Articles