Skip to content
C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform
C++ HTML TeX CSS JavaScript CMake Other
Branch: master
Clone or download
#43 Compare This branch is 48 commits ahead, 1 commit behind Cylix:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Mar 24, 2019
assets/images fixed compile errors for optional include Jan 22, 2019
docs consumer class optimization Nov 28, 2018
examples Add mult exec example (#31) Apr 18, 2019
html consumer class optimization Nov 28, 2018
includes/cpp_redis Make eval api simpler (#29) Apr 18, 2019
latex consumer class optimization Nov 28, 2018
msvc15 Resolve Compiler Warnings for Windows Build (Cylix#129) Nov 3, 2017
sources Make eval api simpler (#29) Apr 18, 2019
tacopie @ 6b060c7 Dev/tacopie (#19) Mar 24, 2019
tests revert test file Dec 28, 2018
.appveyor.yml Create Windows build job with AppVeyor (Cylix#124) Oct 21, 2017
.bazelrc build with bazel (Cylix#197) Aug 30, 2018
.clang-format provide clang-format configuration & apply it. Oct 13, 2016
.doxygen remove private/protected/static members from documentation Sep 25, 2017
.gitignore added additional gitignore Nov 24, 2018
.gitmodules Dev/tacopie (#19) Mar 24, 2019
.travis.yml Wrap win sock related operation (#23) Apr 8, 2019
BUILD.bazel build with bazel (Cylix#197) Aug 30, 2018
BUILD.gtest build with bazel (Cylix#197) Aug 30, 2018
CHANGELOG.md [4.3.1] changelog Feb 1, 2018
CMakeLists.txt Changed CMake conditional to MSVC Mar 24, 2019
CONTRIBUTING.md Update CONTRIBUTING.md Mar 1, 2019
Doxyfile redis 5 support Nov 24, 2018
LICENSE update LICENCE & insert licence headers in source files. Jan 20, 2017
README.md updated README for new logo Jan 22, 2019
WORKSPACE bazel workspace: change to cylix's tacopie (Cylix#201) Sep 17, 2018
clang_format.sh updated submodule for tacopie Mar 24, 2019
cpp_redis.pc.in Generate pkg-config File (#33) Jan 15, 2017

README.md

cpp_redis Build Status Build status

cpp_redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations, pipelining, sentinels and high availability.

Requirement

cpp_redis has no dependency. Its only requirement is C++11.

It comes with no network module, so you are free to configure your own, or to use the default one (tacopie)

Example

cpp_redis::client

cpp_redis::client client;

client.connect();

client.set("hello", "42");
client.get("hello", [](cpp_redis::reply& reply) {
  std::cout << reply << std::endl;
});
//! also support std::future
//! std::future<cpp_redis::reply> get_reply = client.get("hello");

client.sync_commit();
//! or client.commit(); for asynchronous call

cpp_redis::client full documentation and detailed example. More about cpp_redis::reply.

cpp_redis::subscriber

cpp_redis::subscriber sub;

sub.connect();

sub.subscribe("some_chan", [](const std::string& chan, const std::string& msg) {
  std::cout << "MESSAGE " << chan << ": " << msg << std::endl;
});
sub.psubscribe("*", [](const std::string& chan, const std::string& msg) {
  std::cout << "PMESSAGE " << chan << ": " << msg << std::endl;
});

sub.commit();

cpp_redis::subscriber full documentation and detailed example.

Wiki

A Wiki is available and provides full documentation for the library as well as installation explanations.

Doxygen

A Doxygen documentation is available and provides full API documentation for the library.

License

cpp_redis is under MIT License.

Contributing

Please refer to CONTRIBUTING.md.

Special Thanks

Mike Moening for his unexpected and incredible great work aiming to port cpp_redis on Windows, provides sentinel support and high availability support!

Author

Simon Ninon

You can’t perform that action at this time.