Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

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.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
Flushing multiple caches? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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:

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

    Code:
    org.springmodules.cache.provider.CacheNotFoundException: Unable to find cache 'userCache,marketCache'
    	at org.springmodules.cache.provider.ehcache.EhCacheFacade.getCache(EhCacheFacad
    e.java:147)
    	at org.springmodules.cache.provider.ehcache.EhCacheFacade.onFlushCache(EhCacheF
    acade.java:185)
    	at org.springmodules.cache.provider.AbstractCacheProviderFacade.flushCache(Abst
    ractCacheProviderFacade.java:91)
    	at org.springmodules.cache.interceptor.flush.AbstractFlushingInterceptor.invoke
    (AbstractFlushingInterceptor.java:154)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
    iveMethodInvocation.java:185)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
    xy.java:209)
    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

    Comment

    Working...
    X