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

Open
Sander-Toonen opened this issue Sep 16, 2016 · 10 comments

Comments

@Sander-Toonen
Copy link

commented Sep 16, 2016

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

This comment has been minimized.

@Sander-Toonen

This comment has been minimized.

Copy link
Author

commented Sep 26, 2016

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Mar 1, 2017

@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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Collaborator

commented Apr 6, 2018

PRs better explaining the current state of affairs welcome 😄

@soullivaneuh

This comment has been minimized.

Copy link

commented Jun 18, 2018

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

@curry684

This comment has been minimized.

Copy link
Collaborator

commented Jun 18, 2018

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
Projects
None yet
6 participants
You can’t perform that action at this time.