code: func (c *mutationCache) ByIndex(name string, indexKey string) ([]interface{}, error) {
  	c.lock.Lock()
  	defer c.lock.Unlock()
  	if c.indexer == nil {
  		return nil, fmt.Errorf("no indexer has been provided to the mutation cache")
  	}
  	keys, err := c.indexer.IndexKeys(name, indexKey)
  	if err != nil {
  		return nil, err
  	}
  	var items []interface{}
  	keySet := sets.NewString()
  	for _, key := range keys {
  		keySet.Insert(key)
  		obj, exists, err := c.indexer.GetByKey(key)
  		if err != nil {
  			return nil, err
  		}
  		if !exists {
  			continue
  		}
  		if objRuntime, ok := obj.(runtime.Object); ok {
  			items = append(items, c.newerObject(key, objRuntime))
  		} else {
  			items = append(items, obj)
  		}
  	}
  
  	if c.includeAdds {
  		fn := c.indexer.GetIndexers()[name]
  		// Keys() is returned oldest to newest, so full traversal does not alter the LRU behavior
  		for _, key := range c.mutationCache.Keys() {
  			updated, ok := c.mutationCache.Get(key)
  			if !ok {
  				continue
  			}
  			if keySet.Has(key.(string)) {
  				continue
  			}
  			elements, err := fn(updated)
  			if err != nil {
  				klog.V(4).Infof("Unable to calculate an index entry for mutation cache entry %s: %v", key, err)
  				continue
  			}
  			for _, inIndex := range elements {
  				if inIndex != indexKey {
  					continue
  				}
  				items = append(items, updated)
  				break
  			}
  		}
  	}
  
  	return items, nil
  }
docs: // ByIndex returns the newer objects that match the provided index and indexer key.
  // Will return an error if no indexer was provided.