CachePolicyConfig.fromXml constructor

CachePolicyConfig.fromXml(
  1. XmlElement elem
)

Implementation

factory CachePolicyConfig.fromXml(_s.XmlElement elem) {
  return CachePolicyConfig(
    minTTL: _s.extractXmlIntValue(elem, 'MinTTL')!,
    name: _s.extractXmlStringValue(elem, 'Name')!,
    comment: _s.extractXmlStringValue(elem, 'Comment'),
    defaultTTL: _s.extractXmlIntValue(elem, 'DefaultTTL'),
    maxTTL: _s.extractXmlIntValue(elem, 'MaxTTL'),
    parametersInCacheKeyAndForwardedToOrigin: _s
        .extractXmlChild(elem, 'ParametersInCacheKeyAndForwardedToOrigin')
        ?.let((e) => ParametersInCacheKeyAndForwardedToOrigin.fromXml(e)),
  );
}