-
-
Notifications
You must be signed in to change notification settings - Fork 51
[Store] Add support for Redis #269
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
base: main
Are you sure you want to change the base?
Conversation
->useAttributeAsKey('name') | ||
->arrayPrototype() | ||
->children() | ||
->variableNode('connection_parameters') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about going with a DSN here instead? For Symfony cache we use REDIS_URL etc. this way we can just reuse an existing Redis connection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice indeed.
But Symfony cache has a huge amount of code to parse the the DSN.
I don't want to bloat the the store for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good that the RedisStore
only takes an instance of Redis
. It is not its responsibility to instantiate the Redis client.
The bundle configuration should accept a redis service name, which could be created directly in the application or with SncRedisBundle (which accepts dsn in config).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I update the config to support either
- An array of parameter that is passed to the Redis constructor
- A service id that points to an instance of Redis
Could you bring in a rag example as well, please? redis cloud or docker compose maybe |
docker compose if possible please 🙏 |
I added a rag example, with docker compose. I also updated the PR description |
I continue to bench different stores, and the next one is Redis