From the javadocs:
public interface Cache<K,V> extends Function<K,V> {
//...
void invalidate(Object key);
//...
}
Why is this not rendered as a generic method:
void invalidate(K key);
Is there a technical reason, a historical reason, or some other reason?
For the same reason that
Map.removetakes an Object argument, which is explained here and here.This reason is neither technical nor historical: it’s just…an objectively sensible reason.