Daniele Alessandri
094a5bcc90
Fix wrong command class for KEYS in the v2.2 server profile.
2011-03-29 00:14:54 +02:00
Daniele Alessandri
f637872421
Keeping the server profiles classes independent leads to faster initialization times.
2011-03-28 23:56:31 +02:00
Daniele Alessandri
de1a183315
Do some micro-optimizations to reduce the overhead of creating client instances.
2011-03-28 23:25:37 +02:00
Daniele Alessandri
3b70d1e020
Change code formatting for the classes in the Predis\Commands namespace.
2011-03-27 19:46:02 +02:00
Daniele Alessandri
2201dd1df2
Merge branch 'command_hashing'
2011-03-27 18:50:55 +02:00
Daniele Alessandri
c4064e5801
Some commands accepting multiple keys can be hashed if all the keys return the same hash (key tags).
...
List of the commands affected by this change (based on Redis 2.2):
MSET, MGET, DEL, BLPOP, BRPOP, RPOPLPUSH, BRPOPLPUSH, SINTER, SINTERSTORE,
SUNION, SUNIONSTORE, SDIFF, SDIFFSTORE, ZINTERSTORE, ZUNIONSTORE.
2011-03-27 12:12:51 +02:00
Daniele Alessandri
d6a445f1ec
Fix SINTERSTORE and SUNIONSTORE to accept an array for the list of source keys.
2011-03-27 09:38:30 +02:00
Daniele Alessandri
b007b753f5
Fix SUBSCRIBE and PSUBSCRIBE so that they can accept a list of channels for subscription.
2011-03-26 22:45:52 +01:00
Daniele Alessandri
b84c84007f
Remove Predis\ICommand::canBeHashed() as a public method required for command classes and reuse it internally to Predis\Command.
2011-03-24 00:43:02 +01:00
Daniele Alessandri
4e0e1908cd
Minor speed optimizations.
2011-03-23 23:27:05 +01:00
Daniele Alessandri
930a1096e1
Refactor the key hashing logic for Redis commands.
2011-03-23 22:58:49 +01:00
Daniele Alessandri
cdfd0b9f5c
Fix more problems of Predis\MultiExecContext on certain cases.
2011-03-20 15:27:59 +01:00
Daniele Alessandri
e4c45455fe
Fix a couple of corner cases for Predis\MultiExecContext.
2011-03-20 10:47:57 +01:00
Daniele Alessandri
ceca866158
Remove Predis\Network\IConnectionSingle::setProtocolOption() for now.
2011-03-20 10:47:30 +01:00
Daniele Alessandri
665e428366
Give up on some core reusing practices in favor of execution speed and memory usage.
2011-03-20 10:07:40 +01:00
Daniele Alessandri
e84844e33c
Reimplement Predis\Options\CustomOption to implement directly the Predis\Options\IOption interface.
2011-03-18 22:25:45 +01:00
Daniele Alessandri
21ac9b06f5
Do not validate default option values, assume that default values are correct.
2011-03-18 22:01:50 +01:00
Daniele Alessandri
e5ff0ab992
Remove the 'on_connection_initialized' client option (useless in the vast majority of cases).
2011-03-18 21:47:52 +01:00
Daniele Alessandri
743feb0634
Optimize Predis\ClientOptions.
2011-03-18 21:38:37 +01:00
Daniele Alessandri
94d0805cf6
Apply minor change.
2011-03-18 15:13:52 +01:00
Daniele Alessandri
15af329aa3
Add a new option to specify different connection schemes handlers on a client-instance level.
2011-03-18 15:04:06 +01:00
Daniele Alessandri
a10a8e3c9b
Clean up code before fast-forwarding the master branch.
2011-03-12 15:56:22 +01:00
Daniele Alessandri
3181f6c592
Remove useless code.
2011-03-12 15:26:39 +01:00
Daniele Alessandri
b11ab53bb1
Implement new various changes.
2011-03-11 19:07:46 +01:00
Daniele Alessandri
82759cd6ec
Change how parameters are handled internally.
2011-03-10 16:30:00 +01:00
Daniele Alessandri
b5a89a0f50
Add a VERSION constant to Predis\Client.
2011-03-08 11:03:32 +01:00
Daniele Alessandri
14d4492ad6
Slight change, nothing serious here.
2011-03-07 11:12:20 +01:00
Daniele Alessandri
995de40734
Fix Predis\Network\PhpiredisConnection.
2011-03-06 16:20:37 +01:00
Daniele Alessandri
190b687789
Change how network resources are handled internally and also exposed to subclasses.
2011-03-06 14:45:59 +01:00
Daniele Alessandri
be4d01c071
Remove a useless method declaration.
2011-03-06 12:32:43 +01:00
Daniele Alessandri
74b6d05b48
Move the database info parsing bits for the reply to INFO in a separate function.
2011-03-06 12:24:51 +01:00
Daniele Alessandri
58eb4e2477
Make the reply parser for INFO < 2.4 somewhat backwards compatible when used against Redis >= 2.4.
2011-03-06 12:22:22 +01:00
Daniele Alessandri
3186da49b4
Parse allocation_stats if present in the INFO reply.
2011-03-06 12:14:19 +01:00
Daniele Alessandri
3f8b639e2b
Change StreamConnection in order to disable read/write timeouts when the value of 'read_write_timeout' is also equal to 0.
2011-03-06 11:03:53 +01:00
Daniele Alessandri
b03e6c4f02
Make CommandPipeline::recordCommand() overridable by subclasses.
2011-03-06 10:05:46 +01:00
Daniele Alessandri
7bef3abf91
Change the code for the initialization of the phpiredis reader resource.
2011-03-06 09:55:22 +01:00
Daniele Alessandri
f668560a5a
Implement ConnectionParameters::__toString().
2011-03-05 16:36:34 +01:00
Daniele Alessandri
6c9b246b2b
Implement a new command class for INFO to parse the new reply format for this command in Redis > 2.2.
2011-03-05 15:47:54 +01:00
Daniele Alessandri
878b338e87
Fix comment.
2011-03-05 12:27:02 +01:00
Daniele Alessandri
38e76cbbc8
Allow passing an array for the list of source keys to be used in ZUNIONSTORE/ZINTERSTORE.
2011-03-05 11:56:10 +01:00
Daniele Alessandri
f8844ef8b8
Rename IServerProfile::registerCommand() to IServerProfile::defineCommand().
2011-03-05 10:52:38 +01:00
Daniele Alessandri
3681c1e622
Clustered connections should use IConnectionSingle::executeCommand() to execute commands internally.
2011-03-05 10:52:31 +01:00
Daniele Alessandri
99c8acfc8c
Clean up leftovers.
2011-03-04 19:38:47 +01:00
Daniele Alessandri
30bc53ee75
Rename method ICommand::getCommandId() to ICommand::getId().
2011-03-04 19:37:10 +01:00
Daniele Alessandri
0d5fb3319d
Move Predis\Command and Predis\ICommand to the Predis\Commands namespace.
2011-03-04 19:21:41 +01:00
Daniele Alessandri
c3ce210150
Remove a useless 'use' directive.
2011-03-04 18:56:20 +01:00
Daniele Alessandri
8b749386df
Implement Predis\Command::__toString().
2011-03-04 17:17:49 +01:00
Daniele Alessandri
6abac4590d
Rename protocol interfaces.
2011-03-04 17:00:23 +01:00
Daniele Alessandri
a627b91be1
Fix some more namespacing issues.
2011-03-04 16:18:27 +01:00
Daniele Alessandri
5077996940
Add the ability to create new connections using uri strings, array of parameters or instances of Predis\ConnectionParameters.
2011-03-04 16:06:38 +01:00