markPodAsCreated method

  1. @protected
void markPodAsCreated(
  1. String name
)

Marks a pod as having been created at least once.

This method updates internal tracking to indicate that a pod has been instantiated, which affects metadata caching eligibility.

name the name of the pod that was created

Implementation

@protected
void markPodAsCreated(String name) {
  if (!_alreadyCreated.contains(name)) {
    return synchronized(_mergedPodDefinitions, () {
      if (!isPodEligibleForMetadataCaching(name)) {
        // Let the pod definition get re-merged now that we're actually creating
        // the pod... just in case some of its metadata changed in the meantime.
        clearMergedPodDefinition(name);
      }
      _alreadyCreated.add(name);
    });
  }
}