code: func ParseImportCache(importCaches []string) ([]client.CacheOptionsEntry, error) {
  	var imports []client.CacheOptionsEntry
  	for _, importCache := range importCaches {
  		legacy := !strings.Contains(importCache, "type=")
  		if legacy {
  			logrus.Warn("--import-cache <ref> is deprecated. Please use --import-cache type=registry,ref=<ref>,<opt>=<optval>[,<opt>=<optval>] instead.")
  			imports = append(imports, client.CacheOptionsEntry{
  				Type:  "registry",
  				Attrs: map[string]string{"ref": importCache},
  			})
  		} else {
  			im, err := parseImportCacheCSV(importCache)
  			if err != nil {
  				return nil, err
  			}
  			imports = append(imports, im)
  		}
  	}
  	return imports, nil
  }
docs: // ParseImportCache parses --import-cache