-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
add example for cache pool configuration #10390
Conversation
if i want a different redis dsn than the default one for my pool, would i specify that in the |
@nicolas-grekas looking at git blame i think you wrote most of the redis cache adapter... any input on how i would configure different redis dns for different pools? i'd like to improve the documentation but am a bit unsure how it works exactly. |
sure: use the "provider" option of the pool: |
|
||
<framework:config> | ||
<framework:cache> | ||
<framework:pools> |
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.
should be removed
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.
changed to framework:pool with the attributes and no children, as per the xml schema in framework bundle.
services that follow the pattern ``cache.adapter.[type]``. Alternatively you | ||
can specify another cache pool as base, which will make this pool inherit the | ||
settings from the base pool as defaults. You can also use your own | ||
implementation with a service tagged as ``cache.pool`` if you need to. |
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.
adding the tag means the service's constructor must have 3 arguments ($provider, string $namespace = '', int $defaultLifetime = 0
) - if we can omit this, maybe that's better :)
i removed the mention of the obscure cache.pool tag that is not intended to be used by devs. should be ready to merge, thanks for the inputs! |
This PR was merged into the 4.2-dev branch. Discussion ---------- clarify the cache.pools.provider option | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | - | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#10390 improve the documentation in Configuration.php with things we found out in symfony/symfony-docs#10390 Commits ------- ad4aaf151a clarify the cache.pools.provider option
This PR was merged into the 4.2-dev branch. Discussion ---------- clarify the cache.pools.provider option | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | - | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#10390 improve the documentation in Configuration.php with things we found out in symfony/symfony-docs#10390 Commits ------- ad4aaf1 clarify the cache.pools.provider option
Thank you David. |
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #10390). Discussion ---------- add example for cache pool configuration the configuration reference on cache was quite unclear to me. this example should help to make it easier to understand Commits ------- 8de7cdb add example for cache pool configuration
the configuration reference on cache was quite unclear to me. this example should help to make it easier to understand