mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
XL: GetObject caching implemented for XL. (#2017)
The object cache implementation is XL cache, which defaults to 8GB worth of read cache. Currently GetObject() transparently writes to this cache upon first client read and then subsequently serves reads from the same cache. Currently expiration is not implemented.
This commit is contained in:
@@ -141,6 +141,14 @@ func initServerConfig(c *cli.Context) {
|
||||
fatalIf(err, "Unable to convert MINIO_MAXCONN=%s environment variable into its integer value.", maxConnStr)
|
||||
}
|
||||
|
||||
// Fetch max cache size from environment variable.
|
||||
if maxCacheSizeStr := os.Getenv("MINIO_CACHE_SIZE"); maxCacheSizeStr != "" {
|
||||
// We need to parse cache size to its integer value.
|
||||
var err error
|
||||
globalMaxCacheSize, err = strconvBytes(maxCacheSizeStr)
|
||||
fatalIf(err, "Unable to convert MINIO_CACHE_SIZE=%s environment variable into its integer value.", maxCacheSizeStr)
|
||||
}
|
||||
|
||||
// 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