Skip to content

Commit

Permalink
[Chore] Edit metadata cache supported values description (#6252)
Browse files Browse the repository at this point in the history
  • Loading branch information
SungJin1212 authored Oct 8, 2024
1 parent e449374 commit 417d639
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/blocks-storage/querier.md
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,8 @@ blocks_storage:
[subrange_ttl: <duration> | default = 24h]

metadata_cache:
# Backend for metadata cache, if not empty. Supported values: memcached.
# Backend for metadata cache, if not empty. Supported values: memcached,
# redis, and '' (disable).
# CLI flag: -blocks-storage.bucket-store.metadata-cache.backend
[backend: <string> | default = ""]

Expand Down
3 changes: 2 additions & 1 deletion docs/blocks-storage/store-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,8 @@ blocks_storage:
[subrange_ttl: <duration> | default = 24h]

metadata_cache:
# Backend for metadata cache, if not empty. Supported values: memcached.
# Backend for metadata cache, if not empty. Supported values: memcached,
# redis, and '' (disable).
# CLI flag: -blocks-storage.bucket-store.metadata-cache.backend
[backend: <string> | default = ""]

Expand Down
3 changes: 2 additions & 1 deletion docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,8 @@ bucket_store:
[subrange_ttl: <duration> | default = 24h]

metadata_cache:
# Backend for metadata cache, if not empty. Supported values: memcached.
# Backend for metadata cache, if not empty. Supported values: memcached,
# redis, and '' (disable).
# CLI flag: -blocks-storage.bucket-store.metadata-cache.backend
[backend: <string> | default = ""]

Expand Down
4 changes: 3 additions & 1 deletion pkg/storage/tsdb/caching_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
)

var (
supportedMetadataCacheBackends = []string{CacheBackendMemcached, CacheBackendRedis}

errUnsupportedChunkCacheBackend = errors.New("unsupported chunk cache backend")
)

Expand Down Expand Up @@ -140,7 +142,7 @@ type MetadataCacheConfig struct {
}

func (cfg *MetadataCacheConfig) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix string) {
f.StringVar(&cfg.Backend, prefix+"backend", "", fmt.Sprintf("Backend for metadata cache, if not empty. Supported values: %s.", CacheBackendMemcached))
f.StringVar(&cfg.Backend, prefix+"backend", "", fmt.Sprintf("Backend for metadata cache, if not empty. Supported values: %s, and '' (disable).", strings.Join(supportedMetadataCacheBackends, ", ")))

cfg.Memcached.RegisterFlagsWithPrefix(f, prefix+"memcached.")
cfg.Redis.RegisterFlagsWithPrefix(f, prefix+"redis.")
Expand Down

0 comments on commit 417d639

Please sign in to comment.