[Redis] Redis client: Timeouts !

Damien Krotkine damien at krotkine.com
Thu Dec 26 22:28:20 GMT 2013


Hi,

I've just pushed new code in the git master branch. It contains timeouts
related features. Now you can creates a Redis client with connection,
read and write timeouts:

my $redis = Redis->new(
    cnx_timeout => 60,      # connection timeout (in seconds)
    read_timeout => 0,5,    # read timeout (in seconds)
    write_timeout => 1.2,    # write timeout (in seconds)
);   

I haven't yet released it on CPAN, I'd like to do a developer release
first (but I'm not sure how to do that with dzil). Anyway please feel
free to test it and let me know of any issues. The code uses 2
strategies, on mac and linux it uses setsockopt to set read / write
timeouts, on other OS it uses 'select'. I plan to extend the setsockopt
strategies to more OS.

dams.




More information about the Redis mailing list