Added hashtable caching for Java Implementations.

Quick benchmark shows a 4% performance gain.