mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
feat: bring new HDD related performance enhancements (#18239)
Optionally allows customers to enable - Enable an external cache to catch GET/HEAD responses - Enable skipping disks that are slow to respond in GET/HEAD when we have already achieved a quorum
This commit is contained in:
@@ -20,6 +20,7 @@ package cmd
|
||||
import (
|
||||
"io"
|
||||
"math"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
@@ -149,6 +150,9 @@ type ObjectInfo struct {
|
||||
// Date and time at which the object is no longer able to be cached
|
||||
Expires time.Time
|
||||
|
||||
// Cache-Control - Specifies caching behavior along the request/reply chain
|
||||
CacheControl string
|
||||
|
||||
// Specify object storage class
|
||||
StorageClass string
|
||||
|
||||
@@ -200,6 +204,15 @@ type ObjectInfo struct {
|
||||
ParityBlocks int
|
||||
}
|
||||
|
||||
// ExpiresStr returns a stringified version of Expires header in http.TimeFormat
|
||||
func (o ObjectInfo) ExpiresStr() string {
|
||||
var expires string
|
||||
if !o.Expires.IsZero() {
|
||||
expires = o.Expires.UTC().Format(http.TimeFormat)
|
||||
}
|
||||
return expires
|
||||
}
|
||||
|
||||
// ArchiveInfo returns any saved zip archive meta information.
|
||||
// It will be decrypted if needed.
|
||||
func (o *ObjectInfo) ArchiveInfo() []byte {
|
||||
|
||||
Reference in New Issue
Block a user