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.


You should follow me on twitter: