Skip to content

feat: LRU cache for FMSR and IoT sensor metadata lookups#415

Open
yassinejebbouri wants to merge 3 commits into
IBM:mainfrom
yassinejebbouri:caching-optimization
Open

feat: LRU cache for FMSR and IoT sensor metadata lookups#415
yassinejebbouri wants to merge 3 commits into
IBM:mainfrom
yassinejebbouri:caching-optimization

Conversation

@yassinejebbouri

Copy link
Copy Markdown

Summary

Adds an in-memory LRU cache at the tool-server layer to store recently retrieved
sensor and asset metadata. Repeated lookups across tool calls within a session
are served directly from memory, reducing repeated DB retrieval overhead.

Files changed

  • src/cache/cache.py — LRU cache implementation
  • src/servers/fmsr/main.py — FMSR server wired to consult cache
  • src/servers/iot/main.py — IoT server wired to consult cache

Test plan

  • Run overlapping FMSR scenarios and confirm cache hits on repeated sensor lookups
  • Verify cache eviction on capacity overflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants