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

Document how to use this bundle with the Symfony Cache component. #291

Closed
Sander-Toonen opened this issue Sep 16, 2016 · 10 comments · Fixed by #565
Closed

Document how to use this bundle with the Symfony Cache component. #291

Sander-Toonen opened this issue Sep 16, 2016 · 10 comments · Fixed by #565
Labels
documentation Documentation improvements and requests

Comments

@Sander-Toonen
Copy link

Symfony 3.1 comes with the a cache component. I believe it should be possible to configure the app and system pools to use SncRedis, however no documentation or examples are available. Could this use case be added to the documentation?

@teohhanhui
Copy link

@Sander-Toonen
Copy link
Author

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:

framework:
    cache:
        app: cache.adapter.redis
        default_redis_provider: snc_redis.default

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.

@reypm
Copy link

reypm commented Feb 28, 2017

@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
Copy link

reypm commented Mar 1, 2017

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

@teohhanhui
Copy link

@reypm The above snippet in @Sander-Toonen's comment is a working example. It changes the app cache pool to use Redis. That's the cache pool provided by the FrameworkBundle out of the box for you to use in your app code. (There's also a system cache pool which is used by the FrameworkBundle for the various Symfony components.)

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/

@crashev
Copy link

crashev commented Jul 31, 2017

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.

@curry684 curry684 added the documentation Documentation improvements and requests label Apr 6, 2018
@curry684
Copy link
Collaborator

curry684 commented Apr 6, 2018

PRs better explaining the current state of affairs welcome 😄

@soullivaneuh
Copy link

I think #291 (comment) is already enough to be added on the documentation of this bundle. 👍

@curry684
Copy link
Collaborator

PR integrating it in a nice way welcome 😁 Kinda stoked on time myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation improvements and requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants