Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-25Support for Redis 6 ACLs (#1791)Michael Grunder
Add support for Redis 6 ACLs in the `Redis`, `RedisCluster`, and `RedisArray` classes. On a related note, it adds a mechanism for users to customize how we generate persistent connection IDs such that they can be grouped in different ways depending on the specific use case required (e.g. it would allow connections to be grouped by username, or by user-defined persistent_id, or both).
2020-02-07Add RedisSentinel class and testsPavlo Yatsukhnenko
2019-07-09cleanup TSRMLS_* usageRemi Collet
2019-06-03Allow PING to take an optional argument.michael-grunder
Addresses #1563
2019-02-19Remove dead code, fix min_argc for blocking commandsmichael-grunder
2019-02-19Change ZPOP* return type and implement blocking variantsmichael-grunder
This commit updates ZPOPMIN/ZPOPMAX to return the same format that zRange WITHSCORES and zRangeByScore WITHSCORES does. In addition the blocking variants BZPOPMIN and BZPOPMAX are implemented.
2019-02-14Implement GEORADIUS_RO and GEORADIUSBYMEMBER_ROmichael-grunder
This addresses #1502, #1487
2018-09-29Streams (#1413)Michael Grunder
Streams API
2018-04-22Issue #1302Pavlo Yatsukhnenko
Handle async parameter for Redis::flushDb and Redis::flushAll TODO: implementation for RedisArray and RedisCluster
2018-04-10Adds STORE and STOREDIST to GEORADIUS[BYMEMBER]michael-grunder
* Adds the STORE and STOREDIST options to GEORADIUS[BYMEMBER] for both Redis and RedisCluster classes. We attempt to protect the caller from CROSSLOT errors on the client side so as to make it obvious when that is happening. * Created a struct to carry around GEORADIUS options as there are now two more and there were already a lot. * Moved the structs/enums to handle GEORADIUS into the source file instead of header as they aren't needed outside of redis_commands.c
2018-01-19Merge branch 'swapdb-command' into developmichael-grunder
2018-01-18Implement SWAPDB commandmichael-grunder
2018-01-17Syntax fixes and prototype consolidationmichael-grunder
Fix PHP_METHOD syntax fail for unlink Move redis_unlink_cmd by redis_del_cmd as they're the same
2018-01-17Implement UNLINK commandmichael-grunder
This commit implements UNLINK for Redis, RedisCluster, and RedisArray. To a client library UNLINK behaves identically to DEL so we can use the same handlers for both.
2017-10-05Issue #1245Pavlo Yatsukhnenko
Move building `script` command logic to `redis_build_script_cmd` and use it in Redis and RedisCluster objects. Fix arginfo for `RedisCluster::script`. Fix memory leak in `cluster_raw_cmd` when `cluster_cmd_get_slot` fails.
2017-08-20Update EXISTS to handle multiple keysmichael-grunder
Fixes #1223
2017-04-28Refactore EVAL commandmichael-grunder
This commit moves EVAL and EVALSHA command construction to our redis_commands.c file because as with many other commands we can share the logic between Redis and RedisCluster. In addition it removes the last call to the legacy formatting function redis_cmd_format() which can now be removed.
2017-04-27Initial commit of refactored command constructionmichael-grunder
This commit adds a new printf like command construction function with additionaly format specifiers specific to phpredis. Because phpredis can be configured to automatically prefix keys and/or automatically serialize values we had a great deal of redundant boilerplate code. zend_parse_paramaters(..., "sz", &key, &keylen, &z_arg); keyfree = redis_key_prefix(redis_sock, &key, &keylen); valfree = redis_serialize(redis_sock, z_val, &realval, &reallen); /* More processing */ if (keyfree) efree(key); if (valfree) efree(val); Now it is possible to use redis_spprintf and use format specifiers specific to these tasks, which will handle prefixing or serialization (as well as memory cleanup) automatically: /* The library function will automatically prefix and serialize values if phpredis has been configured to do that */ len = phpredis_spprintf(redis_sock, slot TRMLS_CC, "SET", "kv", key, key_len, z_value);
2017-04-23Allow MIGRATE to accept multiple keysmichael-grunder
2017-03-15Add function prototype to remove warningmichael-grunder
2016-09-16WIP: php compatibilityPavlo Yatsukhnenko
Redefine zend_get_parameters_array macro for working with `zval *` instead of `zval **`
2015-10-01Initial support for geo commandsmichael-grunder
This commit adds initial support for the new GEO commands. Presently the more complicated GEORADIUS[BYMEMBER] command doesn't do much post-processing of the response, but will probably be modified in the future to return it in a more php friendly way.
2015-05-09Added a new method sAddArray to both Redis and RedisClustermichael-grunder
Presently, the sAdd command is variadic, meaning that it takes a key and then 1 to N additional arguments for the members being added. We need to keep this functionality to avoid breaking existing code, but there are good performance and other reasons to have an sAdd command which takes a key followed by an array of members, which is what the sAddArray method implements.
2015-05-08Merge remotemichael-grunder
2015-05-07Implement rawCommand() properly, as it's not the COMMAND command in Redis.michael-grunder
2015-05-06Allow pfcount to take a string or arraymichael-grunder
2015-05-06Implements the getMode() commandmichael-grunder
Rename command to rawCommand() as it's named in phpredis proper This introspection function will inform the caller what mode phpredis is in (atomic, pipeline, multi) Conflicts: php_redis.h
2015-05-06Incorporate formalized multi-bulk proessing from developmichael-grunder
This commit just backports the newer and improved multi-bulk processing for various commands (e.g. zrange, hmget,etc) from develop into feature/redis_cluster Also modified getbit to treat the value as a long
2015-05-06COMMAND commandmichael-grunder
Implement the new COMMAND command in Redis for both cluster and non cluster classes. This command is really more of a debug tool but should actually be useful for updating the unit tests as we can now simply detect which commands do and don't exist, etc.
2015-05-06ZREMRANGEBYLEXmichael-grunder
Implemented ZREMRANGEBYLEX in Redis and RedisCluster, and made the zlexcount command generic, as it has the same semantics.
2015-05-06ZREVRANGEBYLEXmichael-grunder
Implemented ZREVRANGEBYLEX for Redis and RedisCluster, and made command construction a generic that can handle either.
2015-05-06ZLEXCOUNTmichael-grunder
Implemented ZLEXCOUNT for both Redis and RedisCluster. Removed unused variable in INFO response processor
2015-05-06ZRANGEBYLEXmichael-grunder
Implemented ZRANGEBYLEX for both Redis and RedisCluster
2015-05-06Key based SCAN variantsmichael-grunder
Implemented HSCAN, SSCAN, and ZSCAN for cluster
2015-05-06UNSUBSCRIBE/PUNSUBSCRIBEmichael-grunder
Implemented the two unsubscribe commands in Redis Cluster. Presently, like with the standard Redis class once you subscribe you're there for good, but it would be nice to be able to use the callback return value to break out of the subscribe loop.
2015-05-06SUBSCRIBE/PSUBSCRIBEmichael-grunder
Implemented SUBSCRIBE and PSUBSCRIBE for Redis Cluster. Currently Cluster will send publish messages to every node, so we can subscribe wherever we like.
2015-05-06WATCH commandmichael-grunder
Implemented the WATCH command for RedisCluster. This command can take any number of keys, so phpredis splits the request across the cluster in the best way it can. For every key in a multiple key command, Redis Cluster requires that they all hash to the same SLOT, else it will return a CROSSLOT error and fail. For WATCH in RedisCluster, a few things to note: * The command will fail if phpredis is out of sync with the keyspace. This is because we'll need to know where to deliver each command, or can't possibly deliver them correctlhy. * The command will fail if any command delivery failures occur on any node. This is the case either for a normal communication error or if RedisCluster returns to us MOVED/ASK redirection.
2015-05-06Created cluster specific option handlingmichael-grunder
Added distribution option to RedisCluster in preperation for implementation of commands which can be distributed by the client. The two distribution modes will be: * DIST_OOE : Maintain order of execution * DIST_SPEED : Most efficient delivery Either way, the RedisCluster object will need to return values that were gathered in the same way they were sent in, but might execute them in a different order if the option is set to DIST_SPEED.
2015-05-06Introspection commandsmichael-grunder
Implemented various introspection/option commands for both Redis and RedisCluster. Commands implemented: * getOption * setOption * _prefix * _serialize * _unserialize With these implemented, we can properly test RedisCluster with things like serialization and prefixing turned on.
2015-05-06Reworked generic_multiple_args command, DELmichael-grunder
Implemented a new version of generic_multiple_args_command which is slightly simpler, avoiding trying to do everything (including different commands with keys, or keys/values) and only operating on keys. The other methods have been implemented differently. Implemented DEL for Redis proper. Cluster DEL will need to be a special kind of command where the client splits the request to various nodes.
2015-05-06OBJECT commandmichael-grunder
Implemented the OBJECT command for both Redis and Redis Cluster
2015-05-06ZADD commandmichael-grunder
Implemented ZADD command for both Redis and RedisCluster
2015-05-06HDEL commandmichael-grunder
Implemented HDEL command for both Redis and RedisCluster objects
2015-05-06Added command generic, LPUSH/RPUSHmichael-grunder
Added a generic command routine where we take a key and then a variable number of arguments. This works for stuff like LPUSH, RPUSH, SADD, SREM, and the like... Implemented LPUSH/RPUSH
2015-05-06ZUNIONSTORE/ZINTERSTOREmichael-grunder
Implemented ZUNIONSTORE and ZINTERSTORE in a generic way that works for both cluster and Redis proper.
2015-05-06ZRANGEBYSCORE/ZREVRANGEBYSCOREmichael-grunder
Implemented ZRANGEBYSCORE and ZREVRANGEBYSCORE in the new way for both Redis and RedisCluster objects. In addition, ZRANGE and ZREVRANGE handling is nearly identical to "BYSCORE" variants, so made this generic.
2015-05-06SORT commandmichael-grunder
Implemented SORT command in a new way (using a zval array to construct each argument, then creating the command from that), as well as updated Redis proper and RedisCluster to use it.
2015-05-06ZINCRBYmichael-grunder
Implemented ZINCRBY command
2015-05-06SRANDMEMBERmichael-grunder
Implemented SRANDMEMBER command for Redis and RedisCluster
2015-05-06HSET/HSETNXmichael-grunder
Implemented HSET and HSETNX commands