[jira] Created: (JCS-62) not able to deallocate the disk memory

"rushi (JIRA)" <[email protected]> Tue, 14 Jul 2009 03:23:14 -0700 (PDT)
Newsgroups gmane.comp.jakarta.turbine.jcs.devel
Message-ID <2023303554.1247566994879.JavaMail.jira@brutus>
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.