[ https://issues.apache.org/jira/browse/SOLR-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153306#comment-13153306 ]
Yonik Seeley commented on SOLR-2906: ------------------------------------ bq. since wantToKeep and wantToRemove are entry counts Yes, it seems like mixing units. But the key to understanding it is that lastAccessed isn't a real timestamp, but just a counter that is incremented for every access. This means that if the latest "timestamp" is 5000, and we know we want to keep at least 1000 entries, then if we run across any timestamps greater than 4000 that it's guaranteed to be in the top 1000 entries and we don't need to consider it further. One can just reverse that logic to figure out that an entry is definitely in the bottom group and we should immediately discard it. > Implement LFU Cache > ------------------- > > Key: SOLR-2906 > URL: https://issues.apache.org/jira/browse/SOLR-2906 > Project: Solr > Issue Type: Sub-task > Components: search > Affects Versions: 3.4 > Reporter: Shawn Heisey > Priority: Minor > Attachments: ConcurrentLFUCache.java, FastLFUCache.java > > > Implement an LFU (Least Frequently Used) cache as the first step towards a > full ARC cache -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org