diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f6676a6fb8..72205cc4829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog ## master / unreleased -* [ENHANCEMENT] Cache: Add per-tenant TTL configuration for query results cache to control cache expiration on a per-tenant basis with separate TTLs for regular and out-of-order data. #5039 +* [ENHANCEMENT] Cache: Add per-tenant TTL configuration for query results cache to control cache expiration on a per-tenant basis with separate TTLs for regular and out-of-order data. #7357 ## 1.21.0 in progress diff --git a/Makefile b/Makefile index b686e1bc015..f612c173592 100644 --- a/Makefile +++ b/Makefile @@ -293,7 +293,7 @@ clean-doc: ./docs/guides/encryption-at-rest.md check-doc: doc - @git diff --exit-code -- ./docs/configuration/config-file-reference.md ./docs/blocks-storage/*.md ./docs/configuration/*.md + @git diff --exit-code -- ./docs/configuration/config-file-reference.md ./docs/blocks-storage/*.md ./docs/configuration/*.md ./schemas/cortex-config-schema.json clean-white-noise: @find . -path ./.pkg -prune -o -path ./vendor -prune -o -path ./website -prune -or -type f -name "*.md" -print | \ diff --git a/schemas/cortex-config-schema.json b/schemas/cortex-config-schema.json index 65d8b15c73f..37e5afe09e7 100644 --- a/schemas/cortex-config-schema.json +++ b/schemas/cortex-config-schema.json @@ -5363,6 +5363,13 @@ "type": "number", "x-cli-flag": "distributor.native-histogram-ingestion-rate-limit" }, + "out_of_order_results_cache_ttl": { + "default": "0s", + "description": "Per-tenant TTL for cached query results that overlap with the out-of-order time window. These results may still receive out-of-order samples, so they typically use a shorter TTL. 0 (default) means use the global cache backend TTL configuration.", + "type": "string", + "x-cli-flag": "frontend.out-of-order-results-cache-ttl", + "x-format": "duration" + }, "out_of_order_time_window": { "default": "0s", "description": "[Experimental] Configures the allowed time window for ingestion of out-of-order samples. Disabled (0s) by default.", @@ -5487,6 +5494,13 @@ "x-cli-flag": "validation.reject-old-samples.max-age", "x-format": "duration" }, + "results_cache_ttl": { + "default": "0s", + "description": "Per-tenant TTL for cached query results in the cache backend (Memcached/Redis/FIFO). This is the standard TTL for results that do not overlap with the out-of-order time window. 0 (default) means use the global cache backend TTL configuration.", + "type": "string", + "x-cli-flag": "frontend.results-cache-ttl", + "x-format": "duration" + }, "ruler_evaluation_delay_duration": { "default": "0s", "description": "Deprecated(use ruler.query-offset instead) and will be removed in v1.19.0: Duration to delay the evaluation of rules to ensure the underlying metrics have been pushed to Cortex.",