[ 
https://issues.apache.org/jira/browse/JCS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989037#comment-13989037
 ] 

Richard Eigenmann commented on JCS-123:
---------------------------------------

Made this into a little standalone Swing app: 
https://github.com/richardeigenmann/JCSExperiment

Perhaps this is helpful?

> Memory Cache with no disk auxiliary: map size doesn't change after initial 
> puts
> -------------------------------------------------------------------------------
>
>                 Key: JCS-123
>                 URL: https://issues.apache.org/jira/browse/JCS-123
>             Project: Commons JCS
>          Issue Type: Question
>          Components: Composite Cache
>    Affects Versions: jcs-2.0.0
>         Environment: Testing
>            Reporter: Richard Eigenmann
>            Priority: Minor
>             Fix For: jcs-2.0.0
>
>
> Curious how JCS handles different memory footprints under varying loads and 
> configurations I built a trivial JFrame that allows me to load a specific 
> number of objects into the cache and then randomly gets them on a timer every 
> few hundred milliseconds. I print out the cache statistics (.getStats()) 
> periodically. 
> I observed if I add 10 objects to the cache through a for loop, the map size 
> jumps from 0 to 10 and stabilises there (cache.ccf allows 1000). The 10 
> objects are in the cache and the timer thread gets them just fine when it 
> asks for them. If I add another 10 objects these 10 objects do not get added 
> to the cache and are not available for the timer thread to get them whilst 
> the first 10 are good.
> If I start with say 1000 objects, the map size initialises at 1000 (assuming 
> the ccf config allows 1000 objects). These 1000 initialise and stay and any 
> additional ones don't.
> It looks like whatever number of objects come in first in rapid succession 
> sets the size of the memory-only cache.
> Is this expected behaviour? I tried the other memory cache types too and seem 
> to get the same reaction. Would this be different if I had a disk auxiliary? 
> (I am caching jpg files from disk so loading them to a cache and writing them 
> to disk auxiliary makes no real sense.)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to