Skip to content

Commit

Permalink
groupcache: fix bugs
Browse files Browse the repository at this point in the history
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
  • Loading branch information
GiedriusS committed May 11, 2022
1 parent 4b292cd commit 453a48e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cache/groupcache.go
Expand Up @@ -150,7 +150,7 @@ func NewGroupcacheWithConfig(logger log.Logger, reg prometheus.Registerer, conf
galaxyhttp.RegisterHTTPHandler(universe, &galaxyhttp.HTTPOptions{
BasePath: basepath,
}, mux)
r.Get(filepath.Join(basepath, conf.GroupcacheGroup, ":key"), mux.ServeHTTP)
r.Get(filepath.Join(basepath, conf.GroupcacheGroup, "*key"), mux.ServeHTTP)

galaxy := universe.NewGalaxy(conf.GroupcacheGroup, int64(conf.MaxSize), galaxycache.GetterFunc(
func(ctx context.Context, id string, dest galaxycache.Codec) error {
Expand Down Expand Up @@ -281,7 +281,7 @@ func (c *Groupcache) Fetch(ctx context.Context, keys []string) map[string][]byte
codec := galaxycache.ByteCodec{}

if err := c.galaxy.Get(ctx, k, &codec); err != nil {
level.Error(c.logger).Log("msg", "failed fetching data from groupcache", "err", err, "key", k)
level.Debug(c.logger).Log("msg", "failed fetching data from groupcache", "err", err, "key", k)
continue
}

Expand Down

0 comments on commit 453a48e

Please sign in to comment.