JDK-8277072 introduced java.io.ClassCache, but there seem to be at least two issues with it:
*) The cache cannot disambiguate between cleared SoftReference and the accidental passing of "null" value; in that case, the retry loop would spin indefinitely;
*) If retry loop would spin several times, every time discovering a cleared SoftReference, it would create and register new SoftReference on the ReferenceQueue. However, it would not *drain* the RQ in the loop; in that case, we might have the unbounded garbage accumulating in RQ;
WIP: https://github.com/openjdk/jdk/pull/7092