[#422] pkg/services: Cache clients by address only

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-03-13 18:22:21 +03:00 committed by Leonard Lyubich
parent 55dec28bbb
commit cc7287d6f7
19 changed files with 55 additions and 68 deletions

View file

@ -1,7 +1,6 @@
package getsvc
import (
"crypto/ecdsa"
"io"
"github.com/nspcc-dev/neofs-api-go/pkg/client"
@ -75,8 +74,8 @@ func (s *SimpleObjectWriter) Object() *object.Object {
return s.obj.Object()
}
func (c *clientCacheWrapper) get(key *ecdsa.PrivateKey, addr string) (getClient, error) {
clt, err := c.cache.Get(key, addr, c.opts...)
func (c *clientCacheWrapper) get(addr string) (getClient, error) {
clt, err := c.cache.Get(addr, c.opts...)
return &clientWrapper{
client: clt,