XmlElementDescriptor (String localName, String namespace) { final QName qName = new QName(namespace, localName); CachedValue<XmlElementDescriptor> cachedValue = myDescriptorsMap.get(qName); if (cachedValue == null) { cachedValue = CachedValuesManager.getManager(myElement.getProject()).createCachedValue(() -> { final XmlElementDescriptor descriptor = findRootDescriptorInner(qName); return descriptor != null ? new CachedValueProvider.Result<>(descriptor, descriptor.getDependencies()) : new CachedValueProvider.Result<>(null, getDependencies()); }, false); myDescriptorsMap.put(qName, cachedValue); } return cachedValue.getValue(); }