public static void invalidateKey(File stackRoot, File commonServicesRoot, File extensionRoot) {
    ModulesPathsKey pathsKey = new ModulesPathsKey(stackRoot, commonServicesRoot, extensionRoot);
    pathsToCachedModulesMap.remove(pathsKey);
  }
Directory tree rescans and stack modules parsing take much time on every module init.
This class enhances {@code}StackManager{@code} to reuse already parsed modules.
ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerMock.java