code: public void cache(Object key, T val) {
          cache.put(key, new SoftReference<T>(val));
      }
docs: Caches the specified object identified by the specified key.
  @param key a unique key for this object
  @param val the object to be cached