[ 
https://issues.apache.org/jira/browse/SOLR-2906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erick Erickson updated SOLR-2906:
---------------------------------

    Attachment: SOLR-2906.patch

Mostly cosmetic changes:

Changed acceptableLimit to acceptableSize to keep it named consistently

Formatted all the files

Implemented Yonik's aging suggestion (but no tests, there doesn't seem to be a 
clean way to implement a test here without creating debug-only code).

I'm not wholly convinced that dividing by 4 is the right thing to do here; 
it'll tend to flatten all the entries making removal somewhat arbitrary as 
after a few passes anything with hits in the low range will collapse to zero. 
That said, though, since the little adventure with lastAccessed, all entries 
with the same number of hits will be treated as LRU so I guess it works.

Marked code as experimental

Commented out some debugging code
                
> 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
>            Assignee: Erick Erickson
>            Priority: Minor
>         Attachments: ConcurrentLFUCache.java, LFUCache.java, SOLR-2906.patch, 
> SOLR-2906.patch, SOLR-2906.patch, SOLR-2906.patch, TestLFUCache.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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to