Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Cache][Lock] Add RedisProxy for lazy Redis connections#24887
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedNov 9, 2017
(now investigating the failure) |
778abd8 tofeca03fComparenicolas-grekas commentedNov 9, 2017
PR ready. |
jderusse commentedNov 10, 2017
Same issue affects the Lock component, and could be patched in the same way. I will open a PR when this one will be merged to reuse the RedisProxy. (thanks FWBundle has a dependency on Cache) Diff is to take into account and allow the new class |
| $this->enableVersioning(); | ||
| }elseif (!$redisClientinstanceof \Redis && !$redisClientinstanceof \RedisArray && !$redisClientinstanceof \Predis\Client) { | ||
| }elseif (!$redisClientinstanceof \Redis && !$redisClientinstanceof \RedisArray && !$redisClientinstanceof \Predis\Client && !$redisClientinstanceof RedisProxy) { | ||
| thrownewInvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\Client, %s given',__METHOD__,is_object($redisClient) ?get_class($redisClient) :gettype($redisClient))); |
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.
this message needs an update right? Same for below.
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'd prefer not: RedisProxy is internal (same for docblocks)
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.
right! 👍
fabpot commentedNov 10, 2017
Thank you@nicolas-grekas. |
…s (nicolas-grekas)This PR was merged into the 3.4 branch.Discussion----------[Cache][Lock] Add RedisProxy for lazy Redis connections| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#24865| License | MIT| Doc PR | -That's the only provider that is not lazy by default, leading to bad DX (see linked issue.)Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/24887/files?w=1).Commits-------1f5e353 [Cache][Lock] Add RedisProxy for lazy Redis connections
ahilles107 commentedNov 20, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hey, looks like it breaks Memcached adapter. |
nicolas-grekas commentedNov 20, 2017
@ahilles107 correct, see#25038. I invite you to create issues when encountering an issue, as comments on closed PRs/issues are kinda lost most of the time. And looking at the history before doing so ;) |
Uh oh!
There was an error while loading.Please reload this page.
That's the only provider that is not lazy by default, leading to bad DX (see linked issue.)
Best reviewedignoring whitespaces.