[#206] Refactor ListObjectsCache

Replaced conflicting names

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
Angira Kekteeva 2021-08-10 15:23:55 +03:00 committed by Kirillov Denis
parent 4ca56d3d6e
commit ae19eb4ad4
4 changed files with 15 additions and 14 deletions

View file

@ -374,7 +374,7 @@ func (n *layer) listAllObjects(ctx context.Context, p ListObjectsParamsCommon) (
return nil, err
}
allObjects = n.cache.Get(cacheKey)
allObjects = n.listObjCache.Get(cacheKey)
if allObjects == nil {
allObjects, err = n.listSortedObjectsFromNeoFS(ctx, allObjectParams{
@ -387,7 +387,7 @@ func (n *layer) listAllObjects(ctx context.Context, p ListObjectsParamsCommon) (
}
// putting to cache a copy of allObjects because allObjects can be modified further
n.cache.Put(cacheKey, append([]*ObjectInfo(nil), allObjects...))
n.listObjCache.Put(cacheKey, append([]*ObjectInfo(nil), allObjects...))
}
return allObjects, nil