code: func cacheKeyFromConfig(dt []byte) digest.Digest {
  	var img ocispec.Image
  	err := json.Unmarshal(dt, &img)
  	if err != nil {
  		return digest.FromBytes(dt)
  	}
  	if img.RootFS.Type != "layers" || len(img.RootFS.DiffIDs) == 0 {
  		return ""
  	}
  	return identity.ChainID(img.RootFS.DiffIDs)
  }
docs: // cacheKeyFromConfig returns a stable digest from image config. If image config
  // is a known oci image we will use chainID of layers.