[ https://issues.apache.org/jira/browse/JCS-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619127#action_12619127 ]
Aaron Smuts commented on JCS-43: -------------------------------- The expiration memory cache is inefficient. Each different create time will require a different Set in the priority list. 10k items created at different times will require 10k HashSets. That's too much. It would be slower but more memory efficient to keep a list sorted by time to live, rather than to try to put them in buckets. You could use a double linked list, keep the last and the first ttl, then do binary search on insertion to find the spot. Then simply remove the last when we fill up. . .. > 3 new eviction policies > ----------------------- > > Key: JCS-43 > URL: https://issues.apache.org/jira/browse/JCS-43 > Project: JCS > Issue Type: Improvement > Components: Composite Cache > Affects Versions: jcs-1.3 > Reporter: Maxim Gordienko > Assignee: Aaron Smuts > Attachments: expiration-strategies.patch > > > Patch attached to this issue contains three new eviction policies: > LFU - least frequently used item is removed on cache overflow > FIFO - the oldest item is removed > Expire - item with closest expiration time is removed > also patch refactors MemoryCache hierarchy to allow easier extension -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]