You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an inconsistency between the docs site and the 'one readme to rule them all'.
The docs site says of multi:
"Return value: True if the transaction could be started."
While the readme says:
"Return value: multi() returns the Redis instance and enters multi-mode. Once in multi-mode, all subsequent method calls return the same object until exec() is called."
This has led to errors in our code base of commands being called on booleans. So it would be awesome to have clarity on how this works. Thank you!
Yep you're reading that correctly. If you are already in multi mode PhpRedis can return false here. I'll see about updating the docs though if we don't say that.
Uh oh!
There was an error while loading. Please reload this page.
There is an inconsistency between the docs site and the 'one readme to rule them all'.
The docs site says of multi:
"Return value: True if the transaction could be started."
While the readme says:
"Return value: multi() returns the Redis instance and enters multi-mode. Once in multi-mode, all subsequent method calls return the same object until exec() is called."
This has led to errors in our code base of commands being called on booleans. So it would be awesome to have clarity on how this works. Thank you!
EDIT:
Looking at the code here: https://github.com/phpredis/phpredis/blob/develop/redis_cluster.c#L1864-L1892
I think it's the case that we get back
false
if we're already in multi mode, otherwise we get our RedisCluster object. I hope that's correct - happy to close this if so.The text was updated successfully, but these errors were encountered: