code: protected void addCachedExtensionVersion(String feature, E extension)
      {
          // versions
          List<E> versions = this.extensionsVersions.get(feature);
  
          if (versions == null) {
              versions = new ArrayList<E>();
              this.extensionsVersions.put(feature, versions);
  
              versions.add(extension);
          } else {
              int index = 0;
              while (index < versions.size()
                  && extension.getId().getVersion().compareTo(versions.get(index).getId().getVersion()) < 0) {
                  ++index;
              }
  
              versions.add(index, extension);
          }
      }
docs: Register extension in all caches.
  
  @param feature the feature
  @param extension the extension