Caching was getting aggressively emptied because Lucene has a callback running on a loop internally that empties the cache if the IndexReader gets garbage collected. This patch caches the IndexReader per-session alongside the LRUQueryCache and slightly modifies the caching policy, which should improve the cache's behavior in prod.
Caching was getting aggressively emptied because Lucene has a callback running on a loop internally that empties the cache if the IndexReader gets garbage collected. This patch caches the IndexReader per-session alongside the LRUQueryCache and slightly modifies the caching policy, which should improve the cache's behavior in prod.