mirror of
https://github.com/minio/minio.git
synced 2025-02-28 05:49:16 -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
|
||||
} else if err != nil {
|
||||
if _, ok := err.(ObjectNotFound); ok {
|
||||
cacheReader.Close()
|
||||
// Delete cached entry if backend object was deleted.
|
||||
dcache.Delete(ctx, bucket, object)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user