forked from TrueCloudLab/frostfs-s3-gw
[#643] Optimize GetObjectTagging
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
9372534345
commit
072e694540
1 changed files with 7 additions and 0 deletions
|
@ -16,6 +16,13 @@ func (n *layer) GetObjectTagging(ctx context.Context, p *ObjectVersion) (string,
|
|||
tags map[string]string
|
||||
)
|
||||
|
||||
if len(p.VersionID) != 0 && p.VersionID != UnversionedObjectVersionID {
|
||||
tags = n.systemCache.GetTagging(objectTaggingCacheKey(p))
|
||||
if tags != nil {
|
||||
return p.VersionID, tags, nil
|
||||
}
|
||||
}
|
||||
|
||||
version, err := n.getNodeVersion(ctx, p)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
|
|
Loading…
Reference in a new issue