(make-redis-pool [ #:client-name client-name #:host host #:port port #:timeout timeout #:db db #:password password #:pool-size pool-size #:idle-ttl idle-ttl]) → redis-pool? client-name : non-empty-string? = "racket-redis" host : non-empty-string? = "127.0.0.1" port : (integer-in 0 65536) = 6379 timeout : exact-nonnegative-integer? = 5000 db : (integer-in 0 15) = 0 password : (or/c false/c non-empty-string?) = #f pool-size : exact-positive-integer? = 4 idle-ttl : exact-nonnegative-integer? = 3600
Connections that have been idle for more than idle-ttl seconds are lazily reconnected.
All other parameters are passed directly to make-redis whenever a new connection is initiated.
(call-with-redis-client pool proc [ #:timeout timeout]) → any pool : redis-pool? proc : (-> redis? any) timeout : (or/c false/c exact-nonnegative-integer?) = #f
Holding on to a connection past the execution of proc is a bad idea so don’t do it.
This function blocks until either a connection becomes available or the timeout (milliseconds) is reached. If timeout is #f, then the function will block indefinitely. Upon timeout an exn:fail:redis:pool:timeout exception is raised.