[ https://issues.apache.org/jira/browse/JCS-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aaron Smuts closed JCS-62. -------------------------- Resolution: Invalid JCS does not remove the item from the data file, only from the key list. The empty spots on the datafile are added to a recycle bin and reused. During an optimization run, remaining gaps will be removed. > not able to deallocate the disk memory > -------------------------------------- > > Key: JCS-62 > URL: https://issues.apache.org/jira/browse/JCS-62 > Project: JCS > Issue Type: Bug > Components: Indexed Disk Cache > Affects Versions: jcs-1.3 > Environment: Windows Xp,RAD,java5,AMD processor > Reporter: rushi > Assignee: Aaron Smuts > Fix For: jcs-1.3 > > > I have configured the JCS to store the cached objects in disk using below > properties. > > jcs.region.report.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes > jcs.region.report.cacheattributes.MaxObjects=2 > > jcs.region.report.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache > jcs.region.report.cacheattributes.UseMemoryShrinker=true > jcs.region.report.elementattributes.MaxLifeSeconds=60 > jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=60 > jcs.region.report.cacheattributes.ShrinkerIntervalSeconds=10 > jcs.region.report.cacheattributes.MaxSpoolPerRun=300 > > jcs.region.report.elementattributes=org.apache.jcs.engine.ElementAttributes > jcs.region.report.elementattributes.IsEternal=false > > > 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=c:/tempcache > jcs.auxiliary.DC.attributes.ClearDiskOnStartup=true > jcs.auxiliary.DC.attributes.maxKeySize=100000 > I tried to cache 100 objects. JCS cached the first 2 objects in the java > memory as I specified jcs.region.report.cacheattributes.MaxObjects=2. The > remaining objects gets cached in the disk file in c:/tempcache/report.data. > After 60 (MaxLifeSeconds) seconds the objects stored in java memory got > deleted. I am able to identify this by looking at the log file, it has log > message like "Exceeded maxLifeSeconds: key name". > I could not see above log message for the cached objects in disk after 60 > seconds. I believe that objects stored on disk never get deleted but the > surprise thing is if i try to access the cached object in disk after 60 > seconds, it is returning null, that means the object has expired. But JCS is > not deallocating the memory occupied by that expired object. > Is it possible to deallocate that memory occupied when the object gets > expired? I thought of asking this as I need to cache lot of data. If I am not > able to deallocate the memory , the file size gets increased and might get > exception. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: jcs-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jcs-dev-h...@jakarta.apache.org