Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
nicolas-grekas merged 1 commit intosymfony:masterfromovrflo:fix-preload
May 12, 2020

Conversation

@ovrflo
Copy link
Contributor

@ovrfloovrflo commentedMay 12, 2020
edited
Loading

Use require_once instead of require when appending cache warmer-returned files to preload file.

QA
Branch?master/5.1
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#36793
LicenseMIT

As requested in#36793, I have changed the Preloader to append files withrequire_once (instead of the existingrequire). This should also help for cases when multiple CacheWarmers return the same file(s).

…hen appending cache warmer-returned files to preload file.
@nicolas-grekasnicolas-grekas added this to the5.1 milestoneMay 12, 2020
@nicolas-grekasnicolas-grekas changed the titlebug #36793 [DI][Preload] Use require_once instead of require when app…[DI] Use require_once instead of require when appending cache warmer-returned files to preload fileMay 12, 2020
@nicolas-grekas
Copy link
Member

Thank you@ovrflo.

@nicolas-grekasnicolas-grekas merged commit869770c intosymfony:masterMay 12, 2020
@stof
Copy link
Member

Couldn't we deduplicate the list instead ?

@ovrflo
Copy link
ContributorAuthor

ovrflo commentedMay 13, 2020
edited
Loading

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 ? (./var/cache/prod/preload/*.php). This could allow us to write preload files from multiple sources (Kernel, CacheWarmupCommand). We could also generate some sort of .meta file to keep track of already preloaded stuff ? I know that my idea is a bit off-topic (deduplication), but I felt the need to mention it :D

Any thoughts on how we could approach deduplication ?

@nicolas-grekas
Copy link
Member

IMHO, we don't care, require_once is perfect for the job.

@ovrfloovrflo deleted the fix-preload branchMay 13, 2020 13:03
@fabpotfabpot mentioned this pull requestMay 16, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

5.1

Development

Successfully merging this pull request may close these issues.

Preload broken with cache:warmup command

4 participants

@ovrflo@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp