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

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedMay 26, 2016
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
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

chalasr, sstok, and trakos reacted with thumbs up emoji
@nicolas-grekasnicolas-grekas changed the titleCache php files[Cache] Added OpcacheAdapterMay 26, 2016
@nicolas-grekasnicolas-grekasforce-pushed thecache-php-files branch 3 times, most recently from42275fa to5cc86c6CompareMay 27, 2016 06:30
@dunglas
Copy link
Member

👍

@nicolas-grekasnicolas-grekas changed the title[Cache] Added OpcacheAdapter[Cache] Added PhpFilesAdapterMay 29, 2016
@nicolas-grekas
Copy link
MemberAuthor

I renamed this one back to PhpFilesAdapter, and I think#18823 should be renamed PhpArrayAdapter.

@nicolas-grekasnicolas-grekasforce-pushed thecache-php-files branch 4 times, most recently from0191b2e to7cd6e18CompareMay 30, 2016 10:35
@xabbuh
Copy link
Member

👍

@nicolas-grekasnicolas-grekas merged commit8983e83 intosymfony:masterJun 6, 2016
nicolas-grekas added a commit that referenced this pull requestJun 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_filesCommits-------8983e83 [Cache] Optimize & wire PhpFilesAdapter14bcd79 [Cache] Added PhpFilesAdapter
@nicolas-grekasnicolas-grekas deleted the cache-php-files branchJune 6, 2016 08:11
@teohhanhui
Copy link
Contributor

Does the user need to setopcache.enable_cli = 1 for this to work?

@nicolas-grekas
Copy link
MemberAuthor

No: you can warmup in the cli without having opcache enabled for the cli

teohhanhui and filipp-kucheriavenko reacted with thumbs up emoji

@fabpotfabpot mentioned this pull requestOct 27, 2016
weaverryan added a commit to symfony/symfony-docs that referenced this pull requestJan 28, 2017
…weaverryan)This PR was merged into the 3.2 branch.Discussion----------Covering two missing Cache adapters introduced in 3.2Hi guys!These are 2 missing adapters that were introduced in 3.2!symfony/symfony#18894 andsymfony/symfony#18823Cheers!Commits-------a3e69e2 Tweaks based on feedback!1b6cb69 Covering two missing adapters introduced in 3.2
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

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@nicolas-grekas@dunglas@xabbuh@teohhanhui@carsonbot@trakos

[8]ページ先頭

©2009-2025 Movatter.jp