diff --git a/cmd/disk-cache.go b/cmd/disk-cache.go index 47a63bfc4..1e52e0001 100644 --- a/cmd/disk-cache.go +++ b/cmd/disk-cache.go @@ -706,7 +706,7 @@ func (c *cacheObjects) PutObject(ctx context.Context, bucket, object string, r * oi, _, err := dcache.Stat(GlobalContext, bucket, object) // avoid cache overwrite if another background routine filled cache if err != nil || oi.ETag != bReader.ObjInfo.ETag { - dcache.Put(GlobalContext, bucket, object, bReader, bReader.ObjInfo.Size, nil, ObjectOptions{UserDefined: getMetadata(bReader.ObjInfo)}, false, true) + dcache.Put(GlobalContext, bucket, object, bReader, bReader.ObjInfo.Size, nil, ObjectOptions{UserDefined: getMetadata(bReader.ObjInfo)}, false, false) } }() } diff --git a/cmd/server-main.go b/cmd/server-main.go index 7bd4d2c3c..0910510b2 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -591,8 +591,9 @@ func serverMain(ctx *cli.Context) { } } + // initialize the new disk cache objects. if globalCacheConfig.Enabled { - // initialize the new disk cache objects. + logStartupMessage(color.Yellow("WARNING: Disk caching is deprecated for single/multi drive MinIO setups. Please migrate to using MinIO S3 gateway instead of disk caching")) var cacheAPI CacheObjectLayer cacheAPI, err = newServerCacheObjects(GlobalContext, globalCacheConfig) logger.FatalIf(err, "Unable to initialize disk caching") diff --git a/internal/config/cache/lookup.go b/internal/config/cache/lookup.go index 6b88c67c8..c436fa87d 100644 --- a/internal/config/cache/lookup.go +++ b/internal/config/cache/lookup.go @@ -56,7 +56,6 @@ const ( DefaultAfter = "0" DefaultWaterMarkLow = "70" DefaultWaterMarkHigh = "80" - DefaultCacheCommit = WriteThrough ) // DefaultKVS - default KV settings for caching. @@ -96,7 +95,7 @@ var ( }, config.KV{ Key: Commit, - Value: DefaultCacheCommit, + Value: "", }, } )