-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Cache strategies #31
Comments
I have described the different strategies as best as I could, but I'm not really sure everything is correct. Feel free to correct it. |
What is implemented in master is "copy 'pools' and symlink everything else". (Which is a really good "it works out of the box"). If you want optimal performance, you symlink everything. (Which is described in #28) Here are some numbers. (I write them here to avoid edit conflicts). Strategy C: Strategy E: (current master, copy only "pools" and symlink rest) |
I'm a bit confused about the strategies. We need to be careful because the cache not only consists of the Container and pools, but also of templates, translations, generated doctrine proxies, the annotations file and the router by default. Everything I listed is perfectly warmable except the "pools" folder, which is completely configurable if you know how (which was my end result in #21). But we should also consider caches that don't exist by default but though other bundles. I don't know of any (I haven't searched) but the current master addresses this by allowing you to change which folders must be writable (#17). I only see 4 Strategies (maybe 5 but the last one isn't implemented).
We could try to build Strategy B (I did in #6) but it is just a worse variant of E so I don't see the point. So let me try to put it in a table:
I consider "no bref kernel" an advantage since it's still not pretty to overwrite kernel methods. Strategy G does need a custom implementation but that could be a bundle or even just a library that isn't even specific to bref but can be used by anyone who has a symfony in a read only environment. I'm not in the mood of benchmarking my project right now, maybe later, but I think I gave a good overview. From my knowledge |
Really great stuff here, thanks for all you details. I will write a proper response (I prefer to take the time to understand everything that you wrote). In the meantime, I had another look at the root of the problem and found symfony/symfony#23354. I opened symfony/symfony#36515 to try moving things forward for the next major versions of Symfony. |
Closing because this is a very old issue. |
I am collecting stuff from various discussions so that we can collect all that in a single place and keep it up to date.
/tmp
var/cache
for the compiled container and/tmp
for everything elsemaster
branch):/tmp
/tmp
/tmp
/tmp
/tmp
var/cache
for the compiled container and the system pool, and/tmp
for other cache poolsBenchmarks
Please feel free to update the description of this issue with benchmark results or new strategies.
The text was updated successfully, but these errors were encountered: