Skip to content

Conversation

@JacksonKaunismaa
Copy link
Contributor

@JacksonKaunismaa JacksonKaunismaa commented Jun 17, 2025

When working with really large caches, especially with multiple processes, you can get OOMs that fail somewhat silently (i.e. I had an issue where API requests would sit forever, and I spent a bunch of time thinking it was something wrong with the API itself, but it turns out that the OS was killing the process and for some reason this didn't actually return me to the terminal). This PR lets you set a maximum size in MB for the cache if desired, to avoid these OOMs. Simply set the max_mem_usage_mb in your ExperimentConfig object. (only applies to FileBasedCacheManager caches)

@JacksonKaunismaa JacksonKaunismaa changed the title Add memory limited cache Add memory limited FileBasedCacheManager Jun 17, 2025
@johnh-ant
Copy link
Contributor

ty, this seems v useful

@JacksonKaunismaa JacksonKaunismaa merged commit 3117839 into main Dec 24, 2025
2 checks passed
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.

3 participants