Skip to content

Instantly share code, notes, and snippets.

@anandkunal
Created September 17, 2014 16:36
Show Gist options
  • Save anandkunal/e2a4e5674d3abc180fb6 to your computer and use it in GitHub Desktop.
Save anandkunal/e2a4e5674d3abc180fb6 to your computer and use it in GitHub Desktop.
func (r *RPC) Clear(skip bool, ack *bool) error {
r.mu.Lock()
defer r.mu.Unlock()
r.cache = make(map[string]string)
*ack = true
r.requests.Clear++
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment