Skip to content

[6.x] Ensure the nocache view directory exists - #15505

Merged
jasonvarga merged 2 commits into
statamic:6.xfrom
lazerg:fix/issue-15504-nocache-dir
Sep 23, 2026
Merged

jasonvarga merged 2 commits into
statamic:6.xfrom
lazerg:fix/issue-15504-nocache-dir

Conversation

@lazerg

@lazerg lazerg commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

This pull request fixes an issue where php artisan optimize fails on a freshly deployed site with The "…/storage/statamic/tmp/nocache" directory does not exist.

Since 6.34.0 the nocache__views namespace points at storage/statamic/tmp/nocache, and that directory is only created the first time a nocache region is written. view:cache collects every registered view path, including namespace hints, and hands them to Symfony's Finder, which throws when one of them is missing. On a new deploy nothing has written a nocache view yet, so the directory isn't there.

This PR fixes it by creating the directory when the view service provider boots, so the namespace always points at something real.

Fixes #15504

@jasonvarga
jasonvarga merged commit ca50df7 into statamic:6.x Sep 23, 2026
61 checks passed
@jasonvarga jasonvarga mentioned this pull request Sep 23, 2026
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.

/storage/statamic/tmp/nocache directory does not exist

2 participants