-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Fallback to default cache system in production for validation #18544
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
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
015c3d0
to
fa9c721
Compare
Not WIP anymore. Targeting 3.1. |
|
||
foreach (array('name', 'root_dir', 'environment', 'debug') as $key) { | ||
if ($container->hasParameter('kernel.'.$key)) { | ||
$namespaceSuffix .= '.'.$container->getParameter('kernel.'.$key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for seeding cache pool namespaces with parameters from the kernel, this was missing
👍 for 3.1 |
Thank you @tgalopin. |
fabpot
added a commit
that referenced
this pull request
Apr 15, 2016
…production for validation (tgalopin) This PR was merged into the 3.1-dev branch. Discussion ---------- [FrameworkBundle] Fallback to default cache system in production for validation | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | WIP | Fixed tickets | - | License | MIT | Doc PR | - This PR proposes a default fallback to filesystem cache for some services if the APC cache is not enabled in production. In other words, if the following part of `config_prod.yml` file is not uncommented, the filesystem will be used: ``` yaml #framework: # validation: # cache: validator.mapping.cache.doctrine.apc # serializer: # cache: serializer.mapping.cache.doctrine.apc # # ... other services ``` Commits ------- 1a65595 [FrameworkBundle] Fallback to default cache system in production for validation
nicolas-grekas
added a commit
that referenced
this pull request
Apr 19, 2016
…production for serializer (tgalopin) This PR was merged into the 3.1-dev branch. Discussion ---------- [FrameworkBundle] Fallback to default cache system in production for serializer | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - In the same idea as #18544, this PR proposes a default fallback to filesystem cache for the serializer if the APC cache is not enabled in production. In other words, if the following part of `config_prod.yml` file is not uncommented, the filesystem will be used: ``` yaml #framework: # serializer: # cache: serializer.mapping.cache.doctrine.apc ``` Commits ------- 4f0b8be [FrameworkBundle] Fallback to default cache system in production for serializer
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this pull request
Apr 19, 2016
…production for serializer (tgalopin) This PR was merged into the 3.1-dev branch. Discussion ---------- [FrameworkBundle] Fallback to default cache system in production for serializer | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - In the same idea as symfony/symfony#18544, this PR proposes a default fallback to filesystem cache for the serializer if the APC cache is not enabled in production. In other words, if the following part of `config_prod.yml` file is not uncommented, the filesystem will be used: ``` yaml #framework: # serializer: # cache: serializer.mapping.cache.doctrine.apc ``` Commits ------- 4f0b8be [FrameworkBundle] Fallback to default cache system in production for serializer
2 tasks
Merged
fabpot
added a commit
that referenced
this pull request
Sep 14, 2016
…or based on PhpArrayAdapter (tgalopin) This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | - | Fixed tickets | - | License | MIT | Doc PR | - Following the cache warmer for annotations PR (#18533), this PR introduces a cache warmer for YAML and XML Validator configuration. Based on the PhpArrayAdapter, it uses the naming conventions (`Resources/config/validation`) to find the files and compile them into a single PHP file stored in the cache directory. This file uses shared memory on PHP 7. The benefit of this PR are the same than the ones of the annotations PR: - validation configuration can be warmed up offline - on PHP 7, there is no need for user extension to get maximum performances (ie. if you use this PR and the other one, you probably won't need to enable APCu to have great performances) - on PHP 7 again, we are not sensitive to APCu memory fragmentation - last but not least, global performance is slightly better (I get 30us per class gain in Blackfire) This PR also deprecates the framework.validator.cache key in favor of the cache pool introduced in #18544. Commits ------- 6bdaf0b [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter
symfony-splitter
pushed a commit
to symfony/validator
that referenced
this pull request
Sep 14, 2016
…or based on PhpArrayAdapter (tgalopin) This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | - | Fixed tickets | - | License | MIT | Doc PR | - Following the cache warmer for annotations PR (symfony/symfony#18533), this PR introduces a cache warmer for YAML and XML Validator configuration. Based on the PhpArrayAdapter, it uses the naming conventions (`Resources/config/validation`) to find the files and compile them into a single PHP file stored in the cache directory. This file uses shared memory on PHP 7. The benefit of this PR are the same than the ones of the annotations PR: - validation configuration can be warmed up offline - on PHP 7, there is no need for user extension to get maximum performances (ie. if you use this PR and the other one, you probably won't need to enable APCu to have great performances) - on PHP 7 again, we are not sensitive to APCu memory fragmentation - last but not least, global performance is slightly better (I get 30us per class gain in Blackfire) This PR also deprecates the framework.validator.cache key in favor of the cache pool introduced in symfony/symfony#18544. Commits ------- 6bdaf0b [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this pull request
Sep 14, 2016
…or based on PhpArrayAdapter (tgalopin) This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | - | Fixed tickets | - | License | MIT | Doc PR | - Following the cache warmer for annotations PR (symfony/symfony#18533), this PR introduces a cache warmer for YAML and XML Validator configuration. Based on the PhpArrayAdapter, it uses the naming conventions (`Resources/config/validation`) to find the files and compile them into a single PHP file stored in the cache directory. This file uses shared memory on PHP 7. The benefit of this PR are the same than the ones of the annotations PR: - validation configuration can be warmed up offline - on PHP 7, there is no need for user extension to get maximum performances (ie. if you use this PR and the other one, you probably won't need to enable APCu to have great performances) - on PHP 7 again, we are not sensitive to APCu memory fragmentation - last but not least, global performance is slightly better (I get 30us per class gain in Blackfire) This PR also deprecates the framework.validator.cache key in favor of the cache pool introduced in symfony/symfony#18544. Commits ------- 6bdaf0b [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter
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 PR proposes a default fallback to filesystem cache for some services if the APC cache is not enabled in production. In other words, if the following part of
config_prod.yml
file is not uncommented, the filesystem will be used: