You know, on further reflection, I'd suggest you think (and ideally
measure) hard about whether you even need this application-level
solr-data-cache.
Solr is a caching machine, it's kind of what Solr does, one of the main
focuses of Solr. A query to Solr that hits the right caches comes back
amazingly fast. With properly turned Solr caches for your use, and
sufficient RAM to hold them (possibly less than you think, Solr is
pretty efficient), I'm not sure you're going to get any benefit at all
from trying to write your own extra cache on top of Solr.
Em wrote:
Jonathan,
sound like it makes sense.
In this case I think it is more important to size the external cache very
well, instead of Solr's.
Even when 1/5th of the requests are redundant, an external cache could not
answer the other 4/5ths and so decreasing Solr's cache would slow down the
whole application.
Since this is only a conceptual question, I really do not have got any
benchmark - data.
But if I have some, I will ask if it was possible to publish them.
Regards