code: func (c *cache) Replace(list []interface{}, resourceVersion string) error {
  	items := make(map[string]interface{}, len(list))
  	for _, item := range list {
  		key, err := c.keyFunc(item)
  		if err != nil {
  			return KeyError{item, err}
  		}
  		items[key] = item
  	}
  	c.cacheStorage.Replace(items, resourceVersion)
  	return nil
  }
docs: // Replace will delete the contents of 'c', using instead the given list.
  // 'c' takes ownership of the list, you should not reference the list again
  // after calling this function.