tinyredisclient
tinyredisclient copied to clipboard
TinyRedisClient - the most lightweight Redis client written in PHP
` private $_socket; public function __construct($address, $port) { $this->_socket = stream_socket_client($address.':'.$port); } public function __call($method, array $args) { array_unshift($args, $method); $cmd = '*' . count($args) . "\r\n"; foreach ($args as...
Data is php serialized string. EG 'a:6:{s:7:"success";b:1;s:5:"total";s:1:"8";s:4:"data";a:8:{i:0;a:17..." etc Data is 7169 bytes long. Returned as "RESP Bulk String"." `$line = fread($this->getSocket(), $result + 2); // FAILS TO RETURN 7171 bytes`...
It does not seem that there is a way to select a DB, then issue a command: echo $redisClient->select(2); echo $redisClient->get('key'); The select does return ok, but the subsequent get...
I found out that if you change line 43 from: : ($this->socket = stream_socket_client($this->server)); to : ($this->socket = stream_socket_client($this->server, $errorno, $errorstr, NULL, STREAM_CLIENT_PERSISTENT)); connection will stay alive and it will...
I've tried this for ssdb, doesnt work with the error of title. Can you help? What should I change?
Would like to have tinyssdbclient and twemproxy client thanks in advance