Say what each not-cacheable reason means and what to change; explain a low Rust hit rate

Each reason now carries a plain name, meaning, action and a fixable flag (checked
against sccache 0.18.0), shown with its count in the reasons panel, fixable first.
The low-hit-rate problem names the fixable loss and the Rust hash-key inputs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Sonnet 5.5 committed 2026-11-28 17:45:38 -07:00
1 parent 3ede855fbb
commit 0f4df265a5
8 files changed
+498 -52

No files matched your search

+19 -2
View File
@@ -78,8 +78,9 @@ pub struct View {
pub build_times: Vec<BuildTimes>,
/// Sorted by hits + misses, largest first.
pub languages: Vec<Language>,
/// Why compiles were not cacheable, largest first, e.g. ("crate-type", 562).
pub not_cached: Vec<(String, u64)>,
/// Why compiles were not cacheable: reasons you can fix first, then expected ones,
/// each largest first.
pub not_cached: Vec<NotCached>,
/// Oldest first, evenly spaced, at most 120.
pub buckets: Vec<Bucket>,
/// Most serious first. Empty means no problems.
@@ -92,6 +93,22 @@ pub struct View {
pub summary_markdown: String,
}
/// One reason sccache gave for not caching a compile, with what to do about it.
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct NotCached {
/// Exactly as sccache words it, e.g. "crate-type".
pub reason: String,
pub count: u64,
/// A plain name, e.g. "Incremental compilation is on".
pub name: String,
/// One sentence on what the reason means.
pub meaning: String,
/// What to change, or why nothing needs changing.
pub action: String,
/// True when a setting you control would make these compiles cacheable.
pub fixable: bool,
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum Status {
/// Compiles arrived in the last five minutes.