Primarily used for pipelining, the redis object produces commands the same way that the main redis_api objects do. If passed in as arguments to the pipeline method (where supported) these commands will then be pipelined. See the redux package for an example.

redis

Format

An object of class redis_commands of length 199.

Examples

# This object creates commands in the format expected by the
# lower-level redis connection object:
redis$PING()
#> [[1]]
#> [1] "PING"
#> 
#> [[2]]
#> NULL
#> 

# For example to send two PING commands in a single transmission:
if (redux::redis_available()) {
  r <- redux::hiredis()
  r$pipeline(
    redux::redis$PING(),
    redux::redis$PING())
}
#> [[1]]
#> [Redis: PONG]
#> 
#> [[2]]
#> [Redis: PONG]
#>