code: func (w *watchCache) updateCache(event *watchCacheEvent) {
  	if w.endIndex == w.startIndex+w.capacity {
  		// Cache is full - remove the oldest element.
  		w.startIndex++
  	}
  	w.cache[w.endIndex%w.capacity] = event
  	w.endIndex++
  }
docs: // Assumes that lock is already held for write.