Awesome – this patch moves the cache into the reader! Finally
Should we make the cache member of ReaderCache somehow accessible?
This way apps can purge individual entries if they want?
Maybe name this ReaderValuesCache? Like we cache other stuff (norms,
deleted docs) in readers...
I think composite readers (Multi/DirReader) should throw UOE if you
try to get their cache; eg this is what flex APIs do as well.
Instead, the app should wrap the composite reader with a
SlowMultiReaderWrapper (or their own IndexReader impl that hides the
sequential sub readers)?
This way, creating insanity is still "possible", but, it won't be done
by accident, ie you really know what you are getting into. If we do
that then I think we don't need insanity checking anymore (because you
made a clear choice to load vlaues @ the composite reader level).