Skip to content

Commit a96d8bb

Browse files
authored
fix(response_cache): don't require redis when disabled and require it when enabled (#8684)
1 parent 371cc57 commit a96d8bb

File tree

3 files changed

+481
-117
lines changed

3 files changed

+481
-117
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### Validate Redis configuration based on response cache enabled state ([PR #8684](https://github.com/apollographql/router/pull/8684))
2+
3+
Previously, the router would attempt to connect to Redis for response caching regardless of whether response caching was enabled or disabled. This could cause unnecessary connection attempts and configuration errors even when the feature was explicitly disabled.
4+
5+
Now, the router ignores Redis configuration if response caching is disabled.
6+
If response caching is configured to be _enabled_, Redis configuration is required, and missing Redis configuration will raise an error on startup:
7+
8+
> Error: you must have a redis configured either for all subgraphs or for subgraph "products"
9+
10+
By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/8684

0 commit comments

Comments
 (0)