Skip to content

[6.x] Stop parallel Stache warming losing cached index usages - #15736

Merged
jasonvarga merged 2 commits into
statamic:6.xfrom
edalzell:fix/parallel-stache-warm-ordering
Oct 29, 2026
Merged

jasonvarga merged 2 commits into
statamic:6.xfrom
edalzell:fix/parallel-stache-warm-ordering

Conversation

@edalzell

@edalzell edalzell commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

With parallel warming enabled, _indexes under storage/framework/cache/data/stache/indexes changes from one stache:warm to the next. Store::cacheIndexUsage() overwrites the cache key with its in-memory list, so when two warm processes touch the same store, the last writer drops the other's usages.

Fix: merge with the cached list before writing, and sort it so the file is byte-stable. Repeated parallel warms with the process and fork drivers now produce identical caches.

Closes #13261

@jasonvarga
jasonvarga merged commit 5bb08b7 into statamic:6.x Oct 29, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parallel Stache warming produces inconsistent Stache _indexes

2 participants