mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
Only use namespace for cache key
This commit is contained in:
parent
d6c1fbf841
commit
9e9773c9c7
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user