8000 [Cache] Show how to configure redis provider by Nyholm · Pull Request #11364 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Cache] Show how to configure redis provider #11364

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

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor fixes
  • Loading branch information
Nyholm committed Apr 9, 2019
commit 605763c7e542b001b8cc9eda617f189358a3cf92
13 changes: 6 additions & 7 deletions cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,11 @@ Custom Provider Options
-----------------------

Some providers have specific options that could be configured. The
:doc:`RedisAdapter </components/cache/adapters/redis_adapter>` allows you do create
providers with option ``lazy`` and ``timeout`` etc. To use these options with non-default
:doc:`RedisAdapter </components/cache/adapters/redis_adapter>` allows you to create
providers with option ``lazy``, ``timeout`` etc. To use these options with non-default
values you need to create your own ``\Redis`` provider and use that when configuring
the pool.


.. configuration-block::

.. code-block:: yaml
Expand Down Expand Up @@ -389,11 +388,11 @@ the pool.
]);

$container->getDefinition('app.my_custom_redis_provider', \Redis::class)
->addArgument('redis://localhost')
->addArgument([
'redis://localhost',
[ 'lazy' => true, 'timeout' => 10 ],
])
->addArgument(31536000);
'lazy' => true,
'timeout' => 10
]);

Creating a Cache Chain
----------------------
Expand Down
0