mirror of
https://github.com/predis/predis.git
synced 2026-10-08 12:57:14 +00:00
Initial support for optional parameters when creating a Client instance. Optional authorization and database selection are now performed automatically upon connection.
This commit is contained in:
@@ -3,8 +3,7 @@ require_once 'SharedConfigurations.php';
|
||||
|
||||
// simple set and get scenario
|
||||
|
||||
$redis = new Predis\Client(REDIS_HOST, REDIS_PORT);
|
||||
$redis->select(REDIS_DB);
|
||||
$redis = Predis\Client::create($configurations);
|
||||
|
||||
$redis->set('library', 'predis');
|
||||
$retval = $redis->get('library');
|
||||
|
||||
Reference in New Issue
Block a user