On 7/5/2015 10:11 PM, William Bell wrote: > Has anyone used solr.LFUCache in Production to replace: > > <filterCache class="solr.FastLRUCache" > > size="4096" > > initialSize="4096" cleanupThread="true" > autowarmCount="32"/> > > Thoughts?
I wrote the LFUCache. It's the most basic and naive implementation possible, so when an entry must be evicted, it has to loop through every single entry in the cache to see how frequently it has been used, making it fairly inefficient over the long term unless the cache size is very small. It would not be a good idea to use it for a large cache, which I think size 4096 would definitely be. There is a more efficient implementation that I also wrote, but I haven't had the time to devote to final touches before getting it committed. https://issues.apache.org/jira/browse/SOLR-3393 Thanks, Shawn