diff --git a/pkg/local_object_storage/shard/shard.go b/pkg/local_object_storage/shard/shard.go index a8938f36..f05b38ec 100644 --- a/pkg/local_object_storage/shard/shard.go +++ b/pkg/local_object_storage/shard/shard.go @@ -22,6 +22,8 @@ type Shard struct { type Option func(*cfg) type cfg struct { + useWriteCache bool + info Info blobOpts []blobstor.Option @@ -78,3 +80,10 @@ func WithLogger(l *logger.Logger) Option { c.log = l } } + +// WithWriteCache returns option to toggle write cache usage. +func WithWriteCache(use bool) Option { + return func(c *cfg) { + c.useWriteCache = use + } +}