-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] Added PhpFilesAdapter #18894
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42275fa
to
5cc86c6
Compare
👍 |
5cc86c6
to
bb6e486
Compare
I renamed this one back to PhpFilesAdapter, and I think #18823 should be renamed PhpArrayAdapter. |
0191b2e
to
7cd6e18
Compare
7cd6e18
to
8983e83
Compare
👍 |
nicolas-grekas
added a commit
that referenced
this pull request
Jun 6, 2016
This PR was merged into the 3.2-dev branch. Discussion ---------- [Cache] Added PhpFilesAdapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This is taking over #18832. With a warm cache I get these numbers consistently (PhpArrayAdapter being the implem in #18823 ): ``` Fetching randomly 5000 items 10000 times: Symfony\Component\Cache\Adapter\FilesystemAdapter: 0.1367, 2 megabytes Symfony\Component\Cache\Adapter\PhpArrayAdapter: 0.0071, 2 megabytes Symfony\Component\Cache\Adapter\PhpFilesAdapter: 0.0389, 2 megabytes Symfony\Component\Cache\Adapter\ApcuAdapter: 0.0361, 2 megabytes ``` This means that the PhpArrayAdapter should be used first, then ApcuAdapter preferred over PhpFilesAdapter, then FilesystemAdapter. This is what AbstractAdapter does here. Also note that to get the cache working, one should stay within the limits defined by the following ini settings: - memory_limit - apc.shm_size - opcache.memory_consumption - opcache.interned_strings_buffer - opcache.max_accelerated_files Commits ------- 8983e83 [Cache] Optimize & wire PhpFilesAdapter 14bcd79 [Cache] Added PhpFilesAdapter
Does the user need to set |
No: you can warmup in the cli without having opcache enabled for the cli |
Merged
weaverryan
added a commit
to symfony/symfony-docs
that referenced
this pull request
Jan 28, 2017
…weaverryan) This PR was merged into the 3.2 branch. Discussion ---------- Covering two missing Cache adapters introduced in 3.2 Hi guys! These are 2 missing adapters that were introduced in 3.2! symfony/symfony#18894 and symfony/symfony#18823 Cheers! Commits ------- a3e69e2 Tweaks based on feedback! 1b6cb69 Covering two missing adapters introduced in 3.2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is taking over #18832.
With a warm cache I get these numbers consistently (PhpArrayAdapter being the implem in #18823 ):
This means that the PhpArrayAdapter should be used first, then ApcuAdapter preferred over PhpFilesAdapter, then FilesystemAdapter. This is what AbstractAdapter does here.
Also note that to get the cache working, one should stay within the limits defined by the following ini settings: