gerlowskija commented on PR #1314:
URL: https://github.com/apache/solr/pull/1314#issuecomment-1405170234

   Alright - perfect.  This ended up being much much nicer I think!
   
   I ended up using `Caffeine.newBuilder` directly instead of Solr's 
`CaffeineCache` wrapper.  (`CaffeineCache` doesn't expose Caffeine's native 
support for weak-references afaict, and comes with a good bit of other baggage 
that we don't need here.). But it allows us to get rid of the ref-counting and 
all that by using "[weak reference 
eviction](https://github.com/ben-manes/caffeine/wiki/Eviction#reference-based)"
   
   In eliminating ref-counting, it also clears up the race condition that David 
mentioned 
[here](https://github.com/apache/solr/pull/1286#discussion_r1084657648), so a 
win-win all around.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to