code: func (c *TagCache) loadFromDisk(ctx context.Context, allServices bool) (*messages.TagCache, error) {
  	path, err := c.fs.RootRelToAbs(tagCacheFilename)
  	if err != nil {
  		return nil, err
  	}
  
  	blob, err := ioutil.ReadFile(path)
  	switch {
  	case os.IsNotExist(err):
  		return &messages.TagCache{}, nil
  	case err != nil:
  		return nil, err
  	}
  
  	// Just ignore the corrupted cache file.
  	cache := messages.TagCache{}
  	if err := UnmarshalWithSHA256(blob, &cache); err != nil {
  		logging.Warningf(ctx, "cipd: can't deserialize tag cache - %s", err)
  		return &messages.TagCache{}, nil
  	}
  
  	// Throw away all entries with empty Service. They are not longer valid.
  	// Also apply 'allServices' filter.
  	filtered := &messages.TagCache{}
  	for _, e := range cache.Entries {
  		if e.Service != "" && (e.Service == c.service || allServices) {
  			filtered.Entries = append(filtered.Entries, e)
  		}
  	}
  	for _, e := range cache.FileEntries {
  		if e.Service != "" && (e.Service == c.service || allServices) {
  			filtered.FileEntries = append(filtered.FileEntries, e)
  		}
  	}
  
  	return filtered, nil
  }
docs: // loadFromDisk loads and parses the tag cache file.
  //
  // If 'allService' is true, returns all cache entries (regardless of what
  // service they correspond to), otherwise filters out all entries that don't
  // match c.service.
  //
  // Returns empty struct if the file is missing or corrupted. Returns errors if
  // the file can't be read.