code: func (c *Cloud) getInstancesByNodeNamesCached(nodeNames sets.String) ([]*ec2.Instance, error) {
  	c.mutex.Lock()
  	defer c.mutex.Unlock()
  	if nodeNames.Equal(c.lastNodeNames) {
  		if len(c.lastInstancesByNodeNames) > 0 {
  			// We assume that if the list of nodes is the same, the underlying
  			// instances have not changed. Later we might guard this with TTLs.
  			glog.V(2).Infof("Returning cached instances for %v", nodeNames)
  			return c.lastInstancesByNodeNames, nil
  		}
  	}
  	instances, err := c.getInstancesByNodeNames(nodeNames.List())
  
  	if err != nil {
  		return nil, err
  	}
  
  	if len(instances) == 0 {
  		return nil, nil
  	}
  
  	glog.V(2).Infof("Caching instances for %v", nodeNames)
  	c.lastNodeNames = nodeNames
  	c.lastInstancesByNodeNames = instances
  	return instances, nil
  }
docs: // Fetches and caches instances by node names; returns an error if any cannot be found.
  // This is implemented with a multi value filter on the node names, fetching the desired instances with a single query.
  // TODO(therc): make all the caching more rational during the 1.4 timeframe