Skip to content

Possibility to configure directory for warmup (kernel.warmup_dir) #43257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

brusch
Copy link
Contributor

@brusch brusch commented Sep 30, 2021

Q A
Branch? 5.4
Bug fix? no
New feature? yes
Deprecations? no
License MIT

This PR adds the possibility to optionally configure the location where the cache warmup should be done.
#36515 introduced already the possibility to have a custom build location, but sometimes it would be also very handy to change the warmup directory as well, especially if you're on a network filesystem such as NFS.
Then you could point the kernel.warmup_dir e.g. to /tmp/symfony-warmup where the build is much faster.

@nicolas-grekas
Copy link
Member

As the comment above the changed lines tell:

    // the warmup cache dir name must have the same length as the real one
   // to avoid the many problems in serialized resources files

Adding a parameter for that would prevent enforcing that rule and we'd have to throw an exception.

To cover your use case, I would recommend you to warmup the Symfony app in a local directory, then to move it to NFS, if that's applicable.

I'm closing because this didn't get traction and won't be accepted for the reason I just gave IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants