Cache: preserve unrelated files during age-based pruning #4238
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4238
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4237"
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?
@RanoGames on GitHub · 2026-11-30 17:40 UTC · original
RanoGames:fix/pipeline-prune-cache-entries→main· +44 −6 · 1 files · 1 commits · closed without merging## What it changes
With
VICTORY_SHADER_CACHE_DAYSenabled, the cache pruner applies its age limit to files one directory below the cache root. It can remove a backup in a sibling folder or a notes file beside a cached shader.Limit expiration to regular files in the layout that
Cache::path_forwrites. Two lowercase hexadecimal digits identify a shard, and the remaining 62 identify the entry inside it.How it was tested
cargo test --locked -p victory-pipelinepassed.Checked for overlap
@babuakhil on GitHub · 2026-11-30 18:17 UTC · original
Checked on Windows 11 (Rust 1.98.1, pinned), on
main(84bd61e2), which this is based on. Clippy onvictory-pipelineis clean with-D warnings, and its 16 tests pass, three runs out of three, the new one among them.It does what it says, and it can't leave a real entry behind. Everything the cache writes is
path_for's lowercase BLAKE3 hex split 2 + 62, or a.tmp-staging file, and the cache is opened only on theshadersfolder (cache_subdir("shaders"), replay'sfolder.join("shaders")), withpipelinesbeside it rather than inside. So a real entry always passesis_hex_name, and anything else in a shard is something the cache didn't write.A throwaway test (not part of this PR) put these in a cache folder, made them all three days old along with
touched-since, and pruned at one day:main.tmp-…staging file in a shardnotes.txtin a shardbackup/backup/old/(two levels down)zz/AB/On
mainthat's 6 removed; with this PR, only the 1 old entry.62c603de71to659f51a499@trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed