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

[FrameworkBundle] allow enabling the HTTP cache using semantic configuration#37351

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
fabpot merged 1 commit intosymfony:masterfromnicolas-grekas:http_cache
Jun 22, 2020

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedJun 19, 2020
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

Right now, using the HTTP cache requires tweaking thepublic/index.php fileas explained in the doc.

This PR removes this requirement by allowing one to do this instead:

framework:http_cache:true

@nicolas-grekasnicolas-grekas added this to thenext milestoneJun 19, 2020
@nicolas-grekasnicolas-grekas changed the title[FrameworkBundle] allow enabling the HTTP cache using semantic config…[FrameworkBundle] allow enabling the HTTP cache using semantic configurationJun 19, 2020
@javiereguiluz
Copy link
Member

This looks nice 👍 Thanks for the config example in the description. This will help the Doc team when this feature has to be documented.

Copy link
Member

@ycerutoyceruto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice idea, thanks !

@nicolas-grekas
Copy link
MemberAuthor

PR is ready.

@maxhelias
Copy link
Contributor

Nice! I love the idea 👍

@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedJun 21, 2020
edited
Loading

Since creating HttpCache outside of the framework was done for perf purpose, I did some benchmarks.
Here are my numbers:

Enabling pointindex.phpframework.yaml
Without preloading2150 r/s1680 r/s
With preloading2400 r/s2315 r/s
yceruto reacted with rocket emojiBafS reacted with eyes emoji

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

fabpot added a commit that referenced this pull requestJun 23, 2020
…ing semantic configuration (nicolas-grekas)This PR was merged into the 5.2-dev branch.Discussion----------[FrameworkBundle] allow configuring trusted proxies using semantic configuration| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| Deprecations? | -| Tickets       | -| License       | MIT| Doc PR        | -On top of the improved DX this should provide, this PR (and#37351) will allow [removing the corresponding lines](symfony/recipes#790) from `index.php` & recipes.Using values:```yamlframework:    trusted_proxies: '127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'#or    trusted_proxies: '%env(TRUSTED_PROXIES)%'````trusted_headers` is similar but is an array of headers to trust.```yamlframework:    # that's the defaults already    trusted_headers: ['x-forwarded-all', '!x-forwarded-host', '!x-forwarded-prefix']```Commits-------af9dd52 [FrameworkBundle] allow configuring trusted proxies using semantic configuration
->arrayNode('private_headers')
->performNoDeepMerging()
->requiresAtLeastOneElement()
->fixXmlConfig('private_header')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this must be on the parent node to work

->integerNode('default_ttl')->end()
->arrayNode('private_headers')
->performNoDeepMerging()
->requiresAtLeastOneElement()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

why would we require at least one element here ?

@nicolas-grekasnicolas-grekas modified the milestones:next,5.2Oct 5, 2020
@fabpotfabpot mentioned this pull requestOct 5, 2020
fabpot added a commit that referenced this pull requestOct 16, 2020
…ion (nicolas-grekas)This PR was merged into the 5.x branch.Discussion----------[FrameworkBundle] fix config declaration of http_cache option| Q             | A| ------------- | ---| Branch?       | 5.2| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -Addresses comments from@stof in#37351 (review)Commits-------2514cf1 [FrameworkBundle] fix config declaration of http_cache option
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestOct 16, 2020
…ion (nicolas-grekas)This PR was merged into the 5.x branch.Discussion----------[FrameworkBundle] fix config declaration of http_cache option| Q             | A| ------------- | ---| Branch?       | 5.2| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -Addresses comments from@stof insymfony/symfony#37351 (review)Commits-------2514cf1c1d [FrameworkBundle] fix config declaration of http_cache option
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

@ycerutoycerutoyceruto approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

8 participants

@nicolas-grekas@javiereguiluz@maxhelias@fabpot@stof@yceruto@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp