lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (Commented) (JIRA)" <>
Subject [jira] [Commented] (SOLR-2906) Implement LFU Cache
Date Sat, 19 Nov 2011 01:20:51 GMT


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:
>             Project: Solr
>          Issue Type: Sub-task
>          Components: search
>    Affects Versions: 3.4
>            Reporter: Shawn Heisey
>            Priority: Minor
>         Attachments:,
> 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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message