-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Problem
The SQLite cache (internal/cache/cache.go) stores entries with TTL metadata but never deletes expired rows. Over time, the cache database will grow unbounded.
Expected Behavior
Expired cache entries should be periodically cleaned up. A simple approach would be to run a DELETE FROM cache_entries WHERE created_at + ttl_seconds < ? query:
- On cache
Open()(prune on startup) - Or periodically during
Set()calls (e.g., every Nth write)
Impact
For long-running automation or agents calling the CLI frequently, the cache.db file will accumulate stale rows indefinitely, consuming disk space unnecessarily.
Suggested Fix
Add a Prune() method to cache.Store and call it during Open() or on a probabilistic basis during Set().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels