Fix documentation about automatic behavior of SYMFONY_HTTP_CACHE#395
Open
peterkeung wants to merge 1 commit intoezsystems:2.5from
Open
Fix documentation about automatic behavior of SYMFONY_HTTP_CACHE#395peterkeung wants to merge 1 commit intoezsystems:2.5from
peterkeung wants to merge 1 commit intoezsystems:2.5from
Conversation
695a668 to
162e561
Compare
|
+1 e.g. |
andrerom
suggested changes
Sep 30, 2019
| # Possible values: 0, 1 or "" | ||
| # Defaults to disabled if SYMFONY_ENV is set to "dev" or SYMFONY_TRUSTED_PROXIES is set, | ||
| # and if this env value is omitted or empty | ||
| # Defaults to disabled if SYMFONY_ENV is set to "dev" |
Contributor
There was a problem hiding this comment.
Well the doc here was trying to explain this in app.php:
// Depending on the SYMFONY_HTTP_CACHE environment variable, tells whether the internal HTTP Cache mechanism is to be used.
// Recommendation is to use Varnish over this, for performance and being able to setup cluster if you need to.
// If not set, or "", it is auto activated if _not_ in "dev" environment.
if (($useHttpCache = getenv('SYMFONY_HTTP_CACHE')) === false || $useHttpCache === '') {
$useHttpCache = $environment !== 'dev';
}
Author
There was a problem hiding this comment.
In reviewing what you just pasted, I think the suggested doc edit makes sense.
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
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.
I can see no code that conditionally sets SYMFONY_HTTP_CACHE based on SYMFONY_TRUSTED_PROXIES
Also the extra phrase about it being empty makes it more confusing than needed. The phrase about the default behavior is good enough.