func (s *Service) ResolveRouting(routingID string) (*RoutingInfo, error) {
	// Fetch from cache if available
	if s.routingCache != nil {
		info, ok := s.routingCache.Get(routingID)
		if ok {
			logrus.Debugf("Resolving cached %s", routingID)
			return info.(*RoutingInfo), nil
		}
	}

	logrus.Debugf("Resolving %s", routingID)
	info, err := s.repo.ResolveRouting(routingID)
	if err != nil {
		logrus.Debugf("Error while resolving route %s: %s", routingID, err)
		return nil, err
	}

	// Store in cache if available
	if s.routingCache != nil {
		_ = s.routingCache.Add(routingID, info)
	}
	return info, nil
}
// ResolveRouting resolves a route.
ResolveRouting resolves a route.
// ResolveRouting resolves a route .
func (s *Service) ResolveRouting(routingID string) (*RoutingInfo, error) {
	if s.routingCache != nil {
		info, ok := s.routingCache.Get(routingID)
		if ok {
			logrus.Debugf("Resolving cached %s", routingID)
			return info.(*RoutingInfo), nil
		}
	}
	logrus.Debugf("Resolving %s", routingID)
	info, err := s.repo.ResolveRouting(routingID)
	if err != nil {
		logrus.Debugf("Error while resolving route %s: %s", routingID, err)
		return nil, err
	}
	if s.routingCache != nil {
		_ = s.routingCache.Add(routingID, info)
	}
	return info, nil
}
func ( s * Service ) ResolveRouting ( routingID string ) ( * RoutingInfo , error ) { if s . routingCache != nil { info , ok := s . routingCache . Get ( routingID ) if ok { logrus . Debugf ( " " , routingID ) return info . ( * RoutingInfo ) , nil } } logrus . Debugf ( " " , routingID ) info , err := s . repo . ResolveRouting ( routingID ) if err != nil { logrus . Debugf ( " " , routingID , err ) return nil , err } if s . routingCache != nil { _ = s . routingCache . Add ( routingID , info ) } return info , nil }
ResolveRouting resolves a route.
ResolveRouting resolves a route .
// Fetch from cache if available // Store in cache if available