[#488] Change cache key types

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-06-28 15:56:41 +03:00 committed by Alex Vanin
parent e104855633
commit 206a7aa395
5 changed files with 24 additions and 27 deletions

View file

@ -50,7 +50,7 @@ func NewAccessBoxCache(config *Config) *AccessBoxCache {
// Get returns a cached object.
func (o *AccessBoxCache) Get(address oid.Address) *accessbox.Box {
entry, err := o.cache.Get(address.EncodeToString())
entry, err := o.cache.Get(address)
if err != nil {
return nil
}
@ -67,5 +67,5 @@ func (o *AccessBoxCache) Get(address oid.Address) *accessbox.Box {
// Put stores an object to cache.
func (o *AccessBoxCache) Put(address oid.Address, box *accessbox.Box) error {
return o.cache.Set(address.EncodeToString(), box)
return o.cache.Set(address, box)
}