mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? This adds support to the lru cache to actively expire entries older than the TTL, by spawning a background goroutine that periodically deletes old entries. A dynamic config, off by default, is added that can enable this feature for the workflow cache. ## Why? This can reduce the memory usage, and associated Go GC resource usage, for workflow entries that won't be utilized since they are past their TTL. ## How did you test it? - [x] built - [x] run locally and tested manually - [x] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s) Also running this in test setups to verify expected memory reduction. ## Potential risks