Replies: 1 comment 5 replies
-
|
FYI in Symfony 5.2 the cache directory has been split in 2: cache and build directory. That allows more easily pre-building the container (in the readonly build directory) before deploying, and moving the read/write "cache" directory to I haven't had time to document or write an example yet, but from 5.2 and up that would be the best solution (fastest + most compatible with other bundles). |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I noticed that the Symfony cold starts tend to get quite slow when following the base setup from here.
I found major improvements in cold starts (3500ms to 1650ms) by warming up the cache before deployment.
This is how I've accomplished it:
Step 1:
Change the getCacheDir to the following function in the Kernel class
Step 2:
Make sure that no cache adapters are using the file system. In my case I had to disable cache for Twig (which doesn't matter because I'm using API-platform anyway) and let the Doctrine cache drive on APCu.
Step 3:
Run these commands for deployment
If there is enough intrest I might add a more brief description to the documentation.
Beta Was this translation helpful? Give feedback.
All reactions