From 2ce33c3fea4f3205fb8211ce51f28ff59aacebc8 Mon Sep 17 00:00:00 2001 From: "Derrick J. Wippler" Date: Thu, 23 May 2019 12:40:01 -0500 Subject: [PATCH] Remove now inits peers if needed --- groupcache.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groupcache.go b/groupcache.go index 586fb79..a781576 100644 --- a/groupcache.go +++ b/groupcache.go @@ -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