I've noticed some unexpected behaviour when working with Redis::eval().
For me it looks a bit weird that I can do this:
$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
$redis->zAdd('key', 1, new stdClass());
but not this:
$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
$redis->eval('redis.call("ZADD", KEYS[1], ARGV[1], ARGV[2])', ['key', 1, new stdClass()], 1);
So guys what do you think about introducing a Redis::serialize() utility method or even serializing arguments automatically for the eval/evalSha?
Thanks.
I've noticed some unexpected behaviour when working with
Redis::eval().For me it looks a bit weird that I can do this:
but not this:
So guys what do you think about introducing a
Redis::serialize()utility method or even serializing arguments automatically for theeval/evalSha?Thanks.