June 26 2012

I’ll dump here some info about a library i started writing some time ago or i’ll end up forgetting it. This is a straightforward c++ wrapper of libhiredis, I know that there are already dozens of c++ Redis libraries out there but i needed something natively compatible with the standard c++ vectors and strings, therefore this library.

I already implemented Redis operations for strings, keys, lists and sets, so it’s already quite usable. hashes and server management calls are not there yet. The usage is designed to be as simple as possible, the following is a snippet taken from the regression tests:

rediswrap::Redis r;
assert(r.decr("foo") == 99);
assert(r.decrby("foo",6) == 93);

vector<string> vals;
assert(r.lpushm("foo",vals) == 3);

The source code is up on github.

I am Riccardo, I studied computer engineering at the University of Trieste (Italy) and then got a M.Sc. in the same field at the University of Stuttgart (Germany). I now live in Zurich, Switzerland.

You should follow me on twitter: