List<T> (@NotNull KeyT key) { String stringKey = keyToString(key); PersistentList<T> cached = cache.get(stringKey); if (cached != null) { return cached; } cached = buildExtensions(stringKey, key); synchronized (lock) { PersistentList<T> recent = cache.get(stringKey); if (recent != null) { return recent; } cache = cache.put(stringKey, cached); return cached; } }