code: func (c *TagCache) AddExtractedObjectRef(ctx context.Context, pin common.Pin, fileName string, ref *api.ObjectRef) error {
  	if err := common.ValidatePin(pin, common.AnyHash); err != nil {
  		return err
  	}
  	if err := common.ValidateObjectRef(ref, common.AnyHash); err != nil {
  		return err
  	}
  
  	c.lock.Lock()
  	defer c.lock.Unlock()
  
  	if c.addedFiles == nil {
  		c.addedFiles = make(map[fileKey]*messages.TagCache_FileEntry, 1)
  	}
  	c.addedFiles[makeFileKey(pin.PackageName, pin.InstanceID, fileName)] = &messages.TagCache_FileEntry{
  		Service:    c.service,
  		Package:    pin.PackageName,
  		InstanceId: pin.InstanceID,
  		FileName:   fileName,
  		ObjectRef:  common.ObjectRefToInstanceID(ref),
  	}
  	return nil
  }
docs: // AddExtractedObjectRef records that fileName extracted from the package at
  // the given pin has the given hash.
  //
  // The hash is represented as ObjectRef, which is a tuple (hash algo, hex
  // digest).
  //
  // Call 'Save' later to persist these changes to the cache file on disk.