Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(EXC-1795): Limit cache disk space #3366

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adambratschikaye
Copy link
Contributor

EXC-1795

Add the ability for the LRU cache to limit space used on disk as well as in memory and use this in the CompilationCache so that it doesn't grow to large.

EXC-1795

Add the ability for the LRU cache to limit space used on disk as well as
in memory and use this in the `CompilationCache` so that it doesn't grow
to large.
@adambratschikaye adambratschikaye requested review from a team as code owners January 8, 2025 14:06
@github-actions github-actions bot added the feat label Jan 8, 2025
@adambratschikaye
Copy link
Contributor Author

Old comment: #3348 (comment)

@adambratschikaye
Copy link
Contributor Author

Old comment: #3348 (comment)

@@ -39,7 +39,7 @@ pub enum CompilationCache {
impl CompilationCache {
pub fn new(capacity: NumBytes) -> Self {
Self::Memory {
cache: Mutex::new(LruCache::new(capacity)),
cache: Mutex::new(LruCache::new(capacity, NumBytes::from(1024 * 1024 * 1024))),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe add a config/constant instead of multiplying 1024*1024*1024 to define 1 GiB?

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

Successfully merging this pull request may close these issues.

2 participants