0
        18:39:39,368 WARN  [org.hibernate.cache.ehcache.internal.strategy.AbstractReadWriteEhcacheAccessStrategy] (http-localhost-127.0.0.1-18080-1) HHH020008: Cache[com.ust.wmi.lakshya.model.User] Key[com.ust.wmi.lakshya.model.User#24047MAN] Lockable[(null)]
        A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limits

        In my project I have two configurations for the cache those are  one is Ehcahce and JCS cache, Following are the configurations.

        **JCS configuration**
        jcs.region.oms=DC
        jcs.region.oms.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
        jcs.region.oms.cacheattributes.MaxObjects=2000
        jcs.region.oms.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
        jcs.region.oms.cacheattributes.UseMemoryShrinker=true
        jcs.region.oms.cacheattributes.MaxMemoryIdleTimeSeconds=86400
        jcs.region.oms.cacheattributes.ShrinkerIntervalSeconds=60
        jcs.region.oms.cacheattributes.MaxSpoolPerRun=500
        jcs.region.oms.elementattributes=org.apache.jcs.engine.ElementAttributes
        jcs.region.oms.elementattributes.IsEternal=false

    Above is the JCS configuration to store my token to Authenticate further with tab.    



        **Ehcache Configuration**
        <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"> 
        <defaultCache
              maxElementsInMemory="1000"  
              eternal="true"  
              overflowToDisk="false" 
              memoryStoreEvictionPolicy="LFU" />
          <cache name="allSegments" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />
          <cache name="allMembers" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />
          <cache name="allStores" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />
          <cache name="allBdas" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />
          <cache name="allProducts" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />
          <cache name="activeOrders" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />
          <cache name="agencies" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />
          <cache name="mobilemoneys" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />
          <cache name="allBDAsForDrop" 
              maxElementsInMemory="1000"  
              eternal="true" 
              overflowToDisk="false"
              memoryStoreEvictionPolicy="LFU" />   
        </ehcache>

上面的配置是将经常使用的对象存储到我的缓存中。我们总共有 9 个基本的快速使用对象,所以在用户请求时检索对象后,我将这些对象保存在 ehcache 中。

I m getting the following warning message. And my objects are not storing in cache.
        When it loggged in from tab one rest service will call and create the token after I m saving the token in the cache for the further requests.
        Now it is not showing the cache instead it is showing the above message.

        Can anyone please help me any modifications needed to overcome that error.`enter code here`
4

0 回答 0