AOSharedServiceLibrary
|
Redis is a key-value store that acts as an application cache
The Redis Admin allows for quick Redis access, and exposes the below methods to do so:
bool expire ( const char * key, unsigned int second)
#include "aossl/redis/factory_redis.h" #include "aossl/redis/redis_interface.h"
RedisComponentFactory redis_factory; RedisInterface *redis = redis_factory.get_redis_interface( "127.0.0.1", 6379 );
//Now, we can access our basic Redis Operations bool bRet = redis->save("Test", "123"); bool eRet = redis->exists("Test"); std::string strValue = redis->load("Test"); redis->del("Test");
The Redis Administrator suports a number of other operations, all of which are covered in Redis' documentation. A full list of supported operations can be found in this libraries API documentation.