code: protected void addCachedExtension(E extension)
      {
          if (!this.extensions.containsKey(extension.getId())) {
              // extensions
              this.extensions.put(extension.getId(), extension);
  
              // versions
              addCachedExtensionVersion(extension.getId().getId(), extension);
              if (!this.strictId) {
                  for (String feature : extension.getFeatures()) {
                      addCachedExtensionVersion(feature, extension);
                  }
              }
          }
      }
docs: Register a new extension.
  
  @param extension the new extension