Fix to cache objects on downloads (#6828)

fixes #6817
master
poornas 6 years ago committed by kannappanr
parent ef517bd0da
commit d732b1ff9d
  1. 2
      cmd/disk-cache.go

@ -303,7 +303,7 @@ func (c cacheObjects) GetObject(ctx context.Context, bucket, object string, star
} }
dcache.Delete(ctx, bucket, object) dcache.Delete(ctx, bucket, object)
} }
if startOffset != 0 || length != objInfo.Size { if startOffset != 0 || (length > 0 && length != objInfo.Size) {
// We don't cache partial objects. // We don't cache partial objects.
return GetObjectFn(ctx, bucket, object, startOffset, length, writer, etag, opts) return GetObjectFn(ctx, bucket, object, startOffset, length, writer, etag, opts)
} }

Loading…
Cancel
Save