code: func (c *ResourceCache) writeMeta(key string, meta transformedResourceMetadata) (filecache.ItemInfo, io.WriteCloser, error) {
  	filenameMeta, filenameContent := c.getFilenames(key)
  	raw, err := json.Marshal(meta)
  	if err != nil {
  		return filecache.ItemInfo{}, nil, err
  	}
  
  	_, fm, err := c.fileCache.WriteCloser(filenameMeta)
  	if err != nil {
  		return filecache.ItemInfo{}, nil, err
  	}
  	defer fm.Close()
  
  	if _, err := fm.Write(raw); err != nil {
  		return filecache.ItemInfo{}, nil, err
  	}
  
  	fi, fc, err := c.fileCache.WriteCloser(filenameContent)
  
  	return fi, fc, err
  
  }
docs: // writeMeta writes the metadata to file and returns a writer for the content part.