From 9e9773c9c72d1c83a61333e616d882ffcff284a1 Mon Sep 17 00:00:00 2001 From: Ben Toogood Date: Wed, 27 May 2020 09:07:59 +0100 Subject: [PATCH] Only use namespace for cache key --- client/cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cache.go b/client/cache.go index 16bd9c70..a6ab71c1 100644 --- a/client/cache.go +++ b/client/cache.go @@ -48,10 +48,10 @@ func (c *Cache) List() map[string]string { // key returns a hash for the context and request func key(ctx context.Context, req *Request) string { - md, _ := metadata.FromContext(ctx) + ns, _ := metadata.Get(ctx, "Micro-Namespace") bytes, _ := json.Marshal(map[string]interface{}{ - "metadata": md, + "namespace": ns, "request": map[string]interface{}{ "service": (*req).Service(), "endpoint": (*req).Endpoint(),