1. A method, comprising: obtaining, via a processor, a classloader cache class definition that comprises code that creates a classloader object cache that is referenced via a strong internal reference by a classloader object in response to instantiation of the classloader cache class definition; instantiating a classloader object cache using the obtained classloader cache class definition, where the strong internal reference is created at instantiation of the classloader object cache; and providing a public interface to the classloader object cache that operates as a weak reference to the classloader object cache and that provides external access to the classloader object cache.