pub struct CacheRecord {
pub path: String,
pub reason: String,
pub file_count: u64,
pub total_bytes: u64,
pub secrets: Vec<SkipRecord>,
}Expand description
A cache directory that was dropped, and the size of what went with it.
One record stands in for a whole subtree, which is the right granularity
for something regenerable — nobody acts on the individual files inside
target/. The size is what makes the record checkable: a cache_dirs entry
aimed at the wrong directory drops hand-written source, and dist → 412 files, 2.1 MB reads nothing like target → 38104 files, 4.2 GB. Without
it, a misconfiguration is one indistinguishable line.
Fields§
§path: StringPath relative to the project root.
reason: StringWhich rule named it a cache.
file_count: u64Regular files below it that were not packed.
total_bytes: u64Sum of those files’ sizes in bytes.
secrets: Vec<SkipRecord>Credential-looking files found inside it, attributed to the rule that swallowed them.
A cache is pruned before the classification pass, so these were
previously neither packed nor reported: safe, but the operator never
learned that node_modules/.npmrc was holding a token. They are still
dropped with the rest of the cache — this only says they were there.
Trait Implementations§
Source§impl Clone for CacheRecord
impl Clone for CacheRecord
Source§fn clone(&self) -> CacheRecord
fn clone(&self) -> CacheRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more