mirror of
https://github.com/predis/predis.git
synced 2026-09-15 21:07:08 +00:00
Examples: updated PubSubContext.php
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
<?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
|
||||
$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
|
||||
$pubsub = $redis->pubSubContext();
|
||||
|
||||
Reference in New Issue
Block a user