mirror of
https://github.com/mailgun/groupcache.git
synced 2024-11-16 14:10:04 +00:00
Remove now inits peers if needed
This commit is contained in:
parent
82209d3632
commit
2ce33c3fea
@ -241,6 +241,8 @@ func (g *Group) Get(ctx Context, key string, dest Sink) error {
|
||||
// Remove clears the key from our cache then forwards the remove
|
||||
// request to all peers.
|
||||
func (g *Group) Remove(ctx Context, key string) error {
|
||||
g.peersOnce.Do(g.initPeers)
|
||||
|
||||
_, err := g.removeGroup.Do(key, func() (interface{}, error) {
|
||||
|
||||
// Remove from key owner first
|
||||
|
Loading…
Reference in New Issue
Block a user