[pr-fix][shaders] Shader cache prune: staging files a stopped run left go by their age too #377
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!377
Loading…
Reference in a new issue
No description provided.
Delete branch "iboom72/cache-prune-staging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it changes
Cache::prune(crates/darner-pipeline/src/cache.rs:188-189) keeps every.tmp-*file (old = !staging && …). So a staging file left by a run that stopped between writing and renaming stays in the shader cache for good. This only matters withDARNER_SHADER_CACHE_DAYSset, because pruning is opt-in.Staging files now go by the same age rule as entries. The shortest
max_agein use is a day (DARNER_SHADER_CACHE_DAYS=1;0turns pruning off), and a write takes far less, so a staging file still being written, by this run or a preload child, is never that old.It doesn't change the shader cache key: darner-pipeline is not part of
DARNER_TRANSLATOR.How it was tested
9e1d37bf(onmainf3840d73)cargo test -p darner-pipeline --locked: 15 passed.prune_removes_old_entries_only_once_hits_are_markednow also has an old staging file removed and a fresh one kept.cargo clippy -p darner-pipeline --all-targets --locked -- -D warnings: clean.Checklist
main.docs/asset-policy.md.Checked for overlap
mark_prunedafter the same loop) and #253 (copy-free keys, same file). Each merges with this branch without a conflict (git merge-treeagainst their heads).Checked with AI assistance (Claude Code).
🤖 Generated with Claude Code