Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
Flushing multiple caches? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Flushing multiple caches?

    Hi guys,

    I'm trying to flush multiple caches when executing a single method but I get an error. Here's what I use:

    <property name="flushingModels">
        <prop key="setUserSegments">cacheNames=userCache,marketCache</prop> 
    When setUserSegments() method is called the following exception is thrown:

    org.springmodules.cache.provider.CacheNotFoundException: Unable to find cache 'userCache,marketCache'
    	at org.springmodules.cache.provider.ehcache.EhCacheFacade.getCache(EhCacheFacad
    	at org.springmodules.cache.provider.ehcache.EhCacheFacade.onFlushCache(EhCacheF
    	at org.springmodules.cache.provider.AbstractCacheProviderFacade.flushCache(Abst
    	at org.springmodules.cache.interceptor.flush.AbstractFlushingInterceptor.invoke
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    It seems that cache names are not tokenized based on the comma separator. Is flushing multiple caches possible and if so, which tokenizer should I use?

    Thanks a bunch!

  • #2
    Flushing multiple caches

    This is a bug in springmodules0.8 (i'm not very sure about the version).

    Stick to the newest version and it will work. There is another workaround, where you define each cache name separately, but you probably don't want to do so.

    springmodules0.9 can understand your syntax. (actually the whole word is interpreted as cache name)

    greets, harry