Reference
boost::redis::request::push
Appends a new command to the end of the request.
Synopsis
Declared in <boost/redis/request.hpp>
template<class... Ts>
void
push(
std::string_view cmd,
Ts const&... args);
Description
For example:
request req;
req.push("SET", "key", "some string", "EX", "2");
This will add a SET command with value "some string" and an expiration of 2 seconds.
Command arguments should either be convertible to std::string_view or support the boost_redis_to_bulk function. This function is a customization point that must be made available using ADL and must have the following signature:
void boost_redis_to_bulk(std::string& to, T const& t);
See cpp20_serialization.cpp
Parameters
Name |
Description |
cmd |
The command to execute. It should be a redis or sentinel command, like |
args |
Command arguments. Non‐string types will be converted to string by calling |
Created with MrDocs