Description
The current semantic cache implementation stores cached queries only in memory. Implement persistence to disk so cached embeddings and results survive application restarts.
Proposed Solution
- Save cache entries to a JSON or pickle file periodically
- Load cached entries on SemanticCache initialization
- Add configurable cache file path via environment variable
- Implement cache expiration/TTL mechanism
Acceptance Criteria
Technical Notes
- Similar pattern to Q-table persistence in
rl_agent.py
- Consider using joblib for efficient numpy array serialization
- Add cache size limits to prevent unbounded growth
Description
The current semantic cache implementation stores cached queries only in memory. Implement persistence to disk so cached embeddings and results survive application restarts.
Proposed Solution
Acceptance Criteria
Technical Notes
rl_agent.py