Only use namespace for cache key

This commit is contained in:
Ben Toogood 2020-05-27 09:07:59 +01:00
parent d6c1fbf841
commit 9e9773c9c7

View File

@ -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(),