public void cache ( Integer key , Object value ) { synchronized ( this ) { Integer curkey = keys . get ( value ) ; // Already cached? if ( curkey != null ) return ; cache . put ( key , value ) ; keys . put ( value , key ) ; } }
Caches an object by the provided key .