Published on

Poco Redis

Today the development of the Poco Redis module is merged into the Poco development branch.

Some examples:

###Setting a key/value with add

Array command;
command.add("SET").add("mykey").add("Hello");

// A set responds with a simple OK string
try
{
  std::string result = redis.execute<std::string>(command);
}
catch(RedisException &e)
{
  ...
}

###Setting a key/value with <<

Array command;
command << "SET" << "mykey" << "Hello";

// A set responds with a simple OK string
try
{
  std::string result = redis.execute<std::string>(command);
}
catch(RedisException &e)
{
  ...
}

###Setting a key/value with Command class

Command set = Command::set("mykey", "Hello");

// A set responds with a simple OK string
try
{
  std::string result = redis.execute<std::string>(set);
}
catch(RedisException &e)
{
  ...
}