软件锁定的缓存条目已被基础Ehcache过期。您应该考虑增加缓存超时和/或容量限制

时间:2016-11-30 13:40:29

标签: hibernate spring-mvc ehcache ehcache-bigmemory

        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`

0 个答案:

没有答案