0
我正在使用JSC緩存來存儲我的應用程序正在使用的大量對象(超過10.000.000) 我寫了一個快速測試來檢查配置,儘管元素似乎被存儲在緩存中,當我試圖檢索它們時,大多數不存在。 我使用的是區域高速緩存和輔助盤緩存,你可以從我的配置文件在Apache JSC緩存中找不到存儲的元素
jcs.region.testCache1=DC
jcs.region.testCache1.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.testCache1.cacheattributes.MaxObjects=1000
jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.testCache1.cacheattributes.UseMemoryShrinker=true
jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
jcs.region.testCache1.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.region.testCache1.elementattributes.IsEternal=true
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=${user.dir}/jcs_swap
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC.attributes.MaxKeySize=-1
我永恆attritbute設置爲「真」看,讓元素永不過期和刪除,一個內存收縮機將元素週期性放入DiscCache和MaxKeySize設置爲-1的DiscCache,表明它可以承載任何數量的裝飾品。你看到任何misconiguratiokn?
當我使用這個配置與中等數量的元素(〜10.000)一切工作正常。當我使用超過1000.000時,我無法檢索大部分元素。