-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Redis adapter #37
base: 3.x
Are you sure you want to change the base?
Conversation
First thanks for your contribution. As there is many redis adapater in the wild (predis credis, php_redis), could you rename the Redis class to CRedis ? |
@lyrixx Thanks |
I don't see any others. |
@lyrixx ok, will rename redis class to CRedis for now. I will keep searching for any other ways. Thanks |
Hi @lyrixx Thanks |
class CRedis implements Collector | ||
{ | ||
private $host; | ||
private $port; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you never use $host
, and $port
, no need to save it.
@vamsiikrishna Do you have time to finish your PR ? |
{ | ||
$this->credis->incr($variable); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@inheritdoc
should be added on methods
@lyrixx I will try to complete this during weekend . Regards |
Hi @lyrixx , any chance you can review it again ? |
@vamsiikrishna sure. But there is still pending comment that should be addressed. After that, we will be OK ;) |
@beberlei sorry to bother you again |
*/ | ||
public function increment($variable) | ||
{ | ||
$this->credis_client->incr($variable); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://redis.io/commands/incr/
Note: this is a string operation because Redis does not have a dedicated integer type. The string stored at the key is interpreted as a base-10 64 bit signed integer to execute the operation.
Once you reach the limit of 2 pow 63 + 1, you will get an error
No description provided.