mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
XL/PutObject: Add single putObject and multipart caching. (#2115)
- Additionally adds test cases as well for object cache. - Adds auto-expiry with expiration and cleanup time interval. Fixes #2080 Fixes #2091
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
b0c180b77c
commit
c0c8a8430e
@@ -149,6 +149,14 @@ func initServerConfig(c *cli.Context) {
|
||||
fatalIf(err, "Unable to convert MINIO_CACHE_SIZE=%s environment variable into its integer value.", maxCacheSizeStr)
|
||||
}
|
||||
|
||||
// Fetch cache expiry from environment variable.
|
||||
if cacheExpiryStr := os.Getenv("MINIO_CACHE_EXPIRY"); cacheExpiryStr != "" {
|
||||
// We need to parse cache expiry to its time.Duration value.
|
||||
var err error
|
||||
globalCacheExpiry, err = time.ParseDuration(cacheExpiryStr)
|
||||
fatalIf(err, "Unable to convert MINIO_CACHE_EXPIRY=%s environment variable into its time.Duration value.", cacheExpiryStr)
|
||||
}
|
||||
|
||||
// Fetch access keys from environment variables if any and update the config.
|
||||
accessKey := os.Getenv("MINIO_ACCESS_KEY")
|
||||
secretKey := os.Getenv("MINIO_SECRET_KEY")
|
||||
|
||||
Reference in New Issue
Block a user