The cache key was the branch name
write-upsystems · 27 points · 13 comments
Following up on my own question, because somebody will hit this.
Our build cache keyed on branch + lockfile hash. Every new branch was a cold cache. By Friday I had eleven branches and the cache had evicted Monday's entries.
The fix was two characters: drop branch from the key. The lockfile hash already says everything the cache needs to know, and the branch name says nothing about the bytes.
What I should have noticed sooner: the cache hit rate was in the logs the whole time, falling linearly across the week. I was reading the wall clock instead of the number that explains it.
13 comments
- jNext
- kPrevious
- EnterOpen
- oOpen, without leaving the letters
- .Its acts
- rReply
- cWrite
- /Search
- ?These keys
Reading this made me go and check ours, and ours was wrong. So: thank you, and also, ugh.