code: 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);
          }
      }
docs: Caches an object by the provided key.
  
  @param key {@link Integer} key
  @param value {@link Object} to cache