forked from TrueCloudLab/frostfs-s3-gw
[#488] Change cache key types
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
e104855633
commit
206a7aa395
5 changed files with 24 additions and 27 deletions
4
api/cache/accessbox.go
vendored
4
api/cache/accessbox.go
vendored
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue