Age | Commit message (Collapse) | Author |
|
Implement Redis 7.0.0 commands SINTERCARD and ZINTERCARD.
|
|
|
|
Add lPos command.
|
|
Add the COUNT argument to LPOP and RPOP
|
|
|
|
Add Redis::hRandField command
|
|
|
|
|
|
|
|
Add geosearch and geosearchstore commands.
|
|
|
|
|
|
|
|
|
|
This commit splits compression and serialization into two distinct parts
and adds some utility functions so the user can compress/uncompress
or pack/unpack data explicily.
See #1939
|
|
Add GET option to SET command
|
|
Add Redis::zdiff and Redis::zdiffstore commands
|
|
|
|
Add Redis::zMscore command.
|
|
Fix for #1847 when dealing with NULL multi bulk replies in RedisCluster.
Adds `Redis::OPT_NULL_MULTIBULK_AS_NULL` setting to have PhpRedis
treat NULL multi bulk replies as `NULL` instead of `[]`.
Co-authored-by: Alex Offshore <offshore@aopdg.ru>
|
|
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).
|
|
Ssl context options in Redis::connect
|
|
In PR #1602 we decided to use unsigned short for storing RedisSock->port
but in previous release I reverted that change. In this PR I changed
signatire of redis_sock_create to prevent unneccecary convertion of types.
|
|
|
|
|
|
|
|
|
|
Adds an option to process the actual strings in simple string replies as
opposed to translating them to `true`. This only applies to
`rawCommand` and `eval` because as far as I know know vanilla Redis
command attaches any information besides `OK` to simple string replies.
Addresses #1550
|
|
PHP 7 removed TSRMLS_CC from zend_throw_exception* routines.
Additionally this commit creates two simple wrapper macros for throwing
Redis or RedisCluster exceptions so we don't duplicate as much code.
Additionally there were a couple of minor compiler warnings printf type
correctness fixed in this commit.
|
|
This commit removes support for PHP 5 by getting rid of all of our Zend
compatibility layer methods, as well as any call checking against
PHP_MAJOR_VERSION or ZEND_MODULE_API_NO.
Unit tests are all passing for Redis, RedisCluster, and RedisArray but
this should still be considered a work in progress until more testing
can be done.
Addresses issue #1448
|
|
|
|
|
|
This should fix the XCLAIM issue on 32-bit PHP installs.
This change will allow the user to pass the XCLAIM TIME option pretty much any way they want (string, long, or float) and it should work. Note that in 32-bit PHP they will only be able to pass exact values <= 2^53 as PHP will use a double precision floating point for integer overflows.
|
|
Streams API
|
|
Persistant connections can be closed via close method.
Connection marked as failed only after reconnection attempts.
|
|
This commit is adding support of data compression.
LZF was choosen because it small and fast and Redis server uses it.
Since [pecl package](https://pecl.php.net/package/lzf) doesn't provide
lzf.h file after installing, LZF library was added as submodule.
Another algorythms may be easely added by analogy with serializers.
TODO: unit-tests for different data types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|