Skip to content

make sccache -s always return current cache size #2419

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

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

Conversation

iTrooz
Copy link

@iTrooz iTrooz commented Jul 2, 2025

sccache server disk cache is usually initiated by the first compilation request. If sccache -s is issued before then, sccache will not return the currently occupied cache size. This PR fixes that by querying the underlying LruDiskCache in current_size(). I don't think there are performance implications of this, but I am not sure.

I also renamed LazyDiskCache to LazyLruDiskCache, because I think the name is more clear. Let me know if you want me to revert that change

iTrooz added 3 commits July 2, 2025 17:12
I think this name makes more sense, given that this type holds a lazily initialized LRU cache
sccache server disk cache is usually initiated by the first compilation request. If `sccache -s` is issued before then, sccache will not return the currently occupied cache size

This PR fixes that
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.

1 participant