Skip to content

Commit 79e3eff

Browse files
committed
fix(cache-middleware): wire max_entries through register.py
Per CodeRabbit on #1879: CacheMiddlewareConfig.max_entries was added to the config schema but register.py still instantiated CacheMiddleware with only (enabled_mode, similarity_threshold) — so a configured max_entries value was silently ignored and deployments always used the 1024 default. Pass config.max_entries through to the constructor so config-driven LRU sizing actually takes effect. Signed-off-by: ColinM-sys <cmcdonough@50words.com>
1 parent 7d06b94 commit 79e3eff

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • packages/nvidia_nat_core/src/nat/middleware/cache

packages/nvidia_nat_core/src/nat/middleware/cache/register.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@ async def cache_middleware(config: CacheMiddlewareConfig, builder: Builder):
3030
Yields:
3131
A configured cache middleware instance
3232
"""
33-
yield CacheMiddleware(enabled_mode=config.enabled_mode, similarity_threshold=config.similarity_threshold)
33+
yield CacheMiddleware(
34+
enabled_mode=config.enabled_mode,
35+
similarity_threshold=config.similarity_threshold,
36+
max_entries=config.max_entries,
37+
)

0 commit comments

Comments
 (0)