mirror of
https://github.com/minio/minio.git
synced 2025-02-28 13:59:15 -05:00
Close CacheReader before clearing cache entry if object is deleted (#7555)
Fixes: #7549
This commit is contained in:
parent
ab7252831e
commit
1d49295943
@ -200,6 +200,7 @@ func (c cacheObjects) GetObjectNInfo(ctx context.Context, bucket, object string,
|
|||||||
return cacheReader, nil
|
return cacheReader, nil
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
if _, ok := err.(ObjectNotFound); ok {
|
if _, ok := err.(ObjectNotFound); ok {
|
||||||
|
cacheReader.Close()
|
||||||
// Delete cached entry if backend object was deleted.
|
// Delete cached entry if backend object was deleted.
|
||||||
dcache.Delete(ctx, bucket, object)
|
dcache.Delete(ctx, bucket, object)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user