forked from TrueCloudLab/frostfs-s3-gw
[#206] Refactor ListObjectsCache
Replaced conflicting names Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
4ca56d3d6e
commit
ae19eb4ad4
4 changed files with 15 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue