code: func (c *threadSafeMap) updateIndices(oldObj interface{}, newObj interface{}, key string) {
  	// if we got an old object, we need to remove it before we add it again
  	if oldObj != nil {
  		c.deleteFromIndices(oldObj, key)
  	}
  	for name, indexFunc := range c.indexers {
  		indexValues, err := indexFunc(newObj)
  		if err != nil {
  			panic(fmt.Errorf("unable to calculate an index entry for key %q on index %q: %v", key, name, err))
  		}
  		index := c.indices[name]
  		if index == nil {
  			index = Index{}
  			c.indices[name] = index
  		}
  
  		for _, indexValue := range indexValues {
  			set := index[indexValue]
  			if set == nil {
  				set = sets.String{}
  				index[indexValue] = set
  			}
  			set.Insert(key)
  		}
  	}
  }
docs: // updateIndices modifies the objects location in the managed indexes, if this is an update, you must provide an oldObj
  // updateIndices must be called from a function that already has a lock on the cache