[
https://issues.apache.org/jira/browse/JCS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17450069#comment-17450069
]
Thomas Vandahl commented on JCS-223:
------------------------------------
Believe it or not, this is actually working as designed.
The disk cache uses a "purgatory" (see
[https://commons.apache.org/proper/commons-jcs/IndexedDiskAuxCache.html] for an
explanation) to queue disk update requests for asynchronous processing. By
default, the purgatory is limited in size (5000 entries). So if you put faster
than the disk updates can happen, the purgatory will overflow and it will throw
away the oldest entries.
However, you may configure the purgatory to unlimited size if you have the use
case and can afford the additional memory by setting
{code:java}
jcs.auxiliary.DC.attributes.MaxPurgatorySize=-1
{code}
BTW, for your example to work properly, you also need to set the key size of
the disk cache to a reasonable value. If you want all items to be stored on
disk, that means 10000 in your example, or even
{code:java}
jcs.auxiliary.DC.attributes.MaxKeySize=-1 {code}
> Data not added in cache at certain scenarios
> --------------------------------------------
>
> Key: JCS-223
> URL: https://issues.apache.org/jira/browse/JCS-223
> Project: Commons JCS
> Issue Type: Bug
> Affects Versions: jcs-3.0
> Environment: JAVA
> Reporter: Sundharam
> Priority: Major
> Attachments: Code.java, cache.ccf, output
>
>
> Created a simple program to put 1000 data in the the cache and read 1000 data
> from the cache. While retrieving the data nearly 200-250 entries were found
> missing.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)