void (@NotNull KeyT key, @NotNull T t) { String stringKey = keyToString(key); synchronized (lock) { PersistentList<T> list = explicitExtensions.get(stringKey); if (list != null) { list = list.remove(t); explicitExtensions = list.isEmpty() ? explicitExtensions.remove(stringKey) : explicitExtensions.put(stringKey, list); } invalidateCacheForExtension(stringKey); } }