code: func (f *EventSourceObjectSpamFilter) Filter(event *v1.Event) bool {
  	var record spamRecord
  
  	// controls our cached information about this event (source+object)
  	eventKey := getSpamKey(event)
  
  	// do we have a record of similar events in our cache?
  	f.Lock()
  	defer f.Unlock()
  	value, found := f.cache.Get(eventKey)
  	if found {
  		record = value.(spamRecord)
  	}
  
  	// verify we have a rate limiter for this record
  	if record.rateLimiter == nil {
  		record.rateLimiter = flowcontrol.NewTokenBucketRateLimiterWithClock(f.qps, f.burst, f.clock)
  	}
  
  	// ensure we have available rate
  	filter := !record.rateLimiter.TryAccept()
  
  	// update the cache
  	f.cache.Add(eventKey, record)
  
  	return filter
  }
docs: // Filter controls that a given source+object are not exceeding the allowed rate.