Reputation: 1319
Is it possible to call a predis command outside of transaction context? I mean to exec hget or hexist while a transaction is opened
Upvotes: 0
Views: 112
Reputation: 10907
You can do it, but not on the same connection.
Here's a transaction that copies foo2
value to foo
, foo2
is read by a second connection:
$responses = $client1->transaction()->set('foo', $client2->get('foo2'))->get('foo')->execute();
Upvotes: 0
Reputation: 6351
No, it`s not possible. Transaction started with (MULTI) works in per connection pipeline. So you should DISCARD/EXEC first or use another predis connection to Redis server.
Upvotes: 2