Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DI] Use require_once instead of require when appending cache warmer-returned files to preload file#36796
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…hen appending cache warmer-returned files to preload file.
nicolas-grekas commentedMay 12, 2020
Thank you@ovrflo. |
stof commentedMay 13, 2020
Couldn't we deduplicate the list instead ? |
ovrflo commentedMay 13, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Deduplicating the list would be ideal, but I don't see how we could do it fast (as development time, since we need to release soon) and reliable. Last night I was thinking of a different approach. Opcache wants us to provide one file for preloading. That doesn't mean that that single file can't load additional preloaders, right ? What if we had an entire directory for preloading ? ( Any thoughts on how we could approach deduplication ? |
nicolas-grekas commentedMay 13, 2020
IMHO, we don't care, require_once is perfect for the job. |
Uh oh!
There was an error while loading.Please reload this page.
Use require_once instead of require when appending cache warmer-returned files to preload file.
As requested in#36793, I have changed the Preloader to append files with
require_once(instead of the existingrequire). This should also help for cases when multiple CacheWarmers return the same file(s).