Add cache.enabled and cache.backend config fields#6585
Open
Add cache.enabled and cache.backend config fields#6585
Conversation
445812e to
a8d7259
Compare
Base automatically changed from
sl/replace-postgres-feature-flags-with-config
to
main
February 27, 2026 20:47
a8d7259 to
9cd8f13
Compare
Add InferenceCacheBackend enum (Auto, ClickHouse, Valkey) and new fields to ModelInferenceCacheConfig: - enabled: Option<bool> - true requires backend, null uses if available, false disables - backend: InferenceCacheBackend - explicit backend selection (default: auto) Update CacheManager::new_from_connections to respect these fields. Add startup validation: cache.enabled=true fails if no backend available. Update StoredCacheConfig for snapshot backward compatibility.
100ae79 to
20dca53
Compare
ed125eb to
c3e78f5
Compare
GabrielBianconi
requested changes
Mar 1, 2026
c3e78f5 to
88b5c3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add InferenceCacheBackend enum (Auto, ClickHouse, Valkey) and new fields to ModelInferenceCacheConfig:
Since we're providing an explicit toggle, in Postgres-primary mode we're going to stop trying to fall back to ClickHouse. Users can explicitly specify clickhouse if they want to.
See https://www.notion.so/tensorzerodotcom/Postgres-backed-TensorZero-config-changes-3107520bbad3804d802bc8d265bc361f?source=copy_link.
Benefits #5691. Will need to document the new config changes soon.