Results 1 to 2 of 2

Thread: Flushing multiple caches?

  1. #1
    Join Date
    Apr 2006
    Location
    Montreal, Canada
    Posts
    178

    Question 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. #2
    Join Date
    Jul 2008
    Posts
    1

    Default 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •