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
Document how to use this bundle with the Symfony Cache component. #291
Comments
Use the |
I use SNCRedis for spooling mail and in some other places for non-caching purposes (locking and spooling) as well. So it would be nice to reuse the same connection. I managed to do this using the following config:
Another advantage of this setup is that cache calls using the cache component will be included in the SNCRedis-item in developer toolbar. I thought it might be worth mentioning this possibility in the documentation. |
@Sander-Toonen is this configuration working? I am working exactly on the same thing and don't have a clue in how to achieve this, could you help with some examples and setup from your experience? |
@reypm You can refer here: https://github.com/symfony/framework-bundle/blob/fc11aa3f2c0170efd354b4e3badaf1fb6455327b/Tests/Functional/app/CachePools/redis_config.yml I believe what @Sander-Toonen gave above is correct. See https://github.com/symfony/symfony/blob/4aa9508ae324cfc7fb02f5b0a3328afbe2768236/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolPass.php for how it works. |
@teohhanhui yes but even though the docs here are really poor. At least a working example should be enough can you provide some of them? |
@reypm The above snippet in @Sander-Toonen's comment is a working example. It changes the If you are unsure of how to utilize the cache, please see https://symfony.com/doc/current/components/cache.html and http://www.php-fig.org/psr/psr-6/ |
Anyway it should be a good idea that some kind of mention of Symfony 3 Cache Component was put somewhere here in docs. Right now it's a bit confusing how SncRedisBundle releates to this new Cache Component, how they can work together and if there is even still a need to use SncRedisBundle for new applications if there is new component handling this out of the box. |
PRs better explaining the current state of affairs welcome 😄 |
I think #291 (comment) is already enough to be added on the documentation of this bundle. 👍 |
PR integrating it in a nice way welcome 😁 Kinda stoked on time myself. |
Symfony 3.1 comes with the a cache component. I believe it should be possible to configure the
app
andsystem
pools to use SncRedis, however no documentation or examples are available. Could this use case be added to the documentation?The text was updated successfully, but these errors were encountered: