Skip to content
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

Closed
wants to merge 3 commits into from
Closed

add example for cache pool configuration #10390

wants to merge 3 commits into from

Conversation

dbu
Copy link
Contributor

@dbu dbu commented Sep 24, 2018

the configuration reference on cache was quite unclear to me. this example should help to make it easier to understand

@dbu
Copy link
Contributor Author

dbu commented Sep 24, 2018

if i want a different redis dsn than the default one for my pool, would i specify that in the provider field of the pool? but the description of that field says "The service name to use as provider when the specified adapter needs one"

reference/configuration/framework.rst Outdated Show resolved Hide resolved
reference/configuration/framework.rst Outdated Show resolved Hide resolved
@dbu
Copy link
Contributor Author

dbu commented Oct 2, 2018

@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.

@nicolas-grekas
Copy link
Member

sure: use the "provider" option of the pool:
provider: redis://localhost


<framework:config>
<framework:cache>
<framework:pools>
Copy link
Member

Choose a reason for hiding this comment

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

should be removed

Copy link
Contributor Author

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.
Copy link
Member

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 :)

@dbu
Copy link
Contributor Author

dbu commented Oct 5, 2018

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!

symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull request Oct 6, 2018
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
fabpot added a commit to symfony/symfony that referenced this pull request Oct 6, 2018
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
@javiereguiluz javiereguiluz added this to the 3.4 milestone Oct 8, 2018
@javiereguiluz
Copy link
Member

Thank you David.

javiereguiluz added a commit that referenced this pull request Oct 8, 2018
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
@dbu dbu deleted the patch-9 branch October 18, 2018 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants