Set X-Cache and X-Cache-Lookup headers for cache (#8794)

X-Cache sets cache status of HIT if object is
served from the disk cache, or MISS otherwise.
X-Cache-Lookup is set to HIT if object was found
in the cache even if not served (for e.g. if cache
 entry was invalidated by ETag verification)
This commit is contained in:
poornas
2020-01-10 20:21:13 -08:00
committed by kannappanr
parent 2bf6cf0e15
commit 9199033db7
6 changed files with 50 additions and 10 deletions

View File

@@ -143,6 +143,11 @@ type ObjectInfo struct {
// Date and time at which the object is no longer able to be cached
Expires time.Time
// CacheStatus sets status of whether this is a cache hit/miss
CacheStatus CacheStatusType
// CacheLookupStatus sets whether a cacheable response is present in the cache
CacheLookupStatus CacheStatusType
// Specify object storage class
StorageClass string