code: protected void removeCachedExtension(E extension)
      {
          // Remove the extension from the memory.
          this.extensions.remove(extension.getId());
  
          // versions
          removeCachedExtensionVersion(extension.getId().getId(), extension);
          if (!this.strictId) {
              for (String feature : extension.getFeatures()) {
                  removeCachedExtensionVersion(feature, extension);
              }
          }
      }
docs: Remove extension from all caches.
  
  @param extension the extension