|
@@ -1,8 +1,11 @@
|
|
<?php
|
|
<?php
|
|
require_once '../lib/Predis.php';
|
|
require_once '../lib/Predis.php';
|
|
|
|
|
|
|
|
+// Redis 2.0 features new commands that allow clients to subscribe for
|
|
|
|
+// events published on certain channels (PUBSUB).
|
|
|
|
+
|
|
// Create a client and disable r/w timeout on the socket
|
|
// Create a client and disable r/w timeout on the socket
|
|
-$redis = new \Predis\Client('redis://127.0.0.1:6379/?read_write_timeout=-1', 'dev');
|
|
|
|
|
|
+$redis = new Predis\Client('redis://127.0.0.1:6379/?read_write_timeout=-1', 'dev');
|
|
|
|
|
|
// Initialize a new pubsub context
|
|
// Initialize a new pubsub context
|
|
$pubsub = $redis->pubSubContext();
|
|
$pubsub = $redis->pubSubContext();
|