June 2017
Intermediate to advanced
536 pages
9h 49m
English
Much like MongoDB, Redis also does not have ACID support in a sense that MySQL has, which is alright really, as Redis is just a key/value store and not a relational database. Redis, however, provides a level of atomicity. Using MULTI, EXEC, DISCARD, and WATCH, we are able to execute a group of commands within a single step, during which Redis makes the following two guarantees:
Let's take a look at the following example:
<?phptry { $client = new Redis(); $client->connect('localhost', 6379); $client->multi(); $result1 = $client->set('tKey1', 'Test#1'); // Valid command $result2 = $client ...