{"id":19029164,"url":"https://github.com/aileshe/simple-redis","last_synced_at":"2026-05-15T13:01:48.401Z","repository":{"id":226139012,"uuid":"152606899","full_name":"aileshe/simple-redis","owner":"aileshe","description":"simple-redis  简单的Redis C++封装类","archived":false,"fork":false,"pushed_at":"2019-08-07T11:06:23.000Z","size":302,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-24T10:55:43.393Z","etag":null,"topics":["cpp","cpp11","redis"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aileshe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-10-11T14:39:27.000Z","updated_at":"2019-08-07T11:04:56.000Z","dependencies_parsed_at":"2024-03-06T04:25:31.585Z","dependency_job_id":"d4bb3bdc-46c5-4dec-a34f-063b30d1b657","html_url":"https://github.com/aileshe/simple-redis","commit_stats":null,"previous_names":["aileshe/simple-redis"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/aileshe/simple-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aileshe%2Fsimple-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aileshe%2Fsimple-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aileshe%2Fsimple-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aileshe%2Fsimple-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aileshe","download_url":"https://codeload.github.com/aileshe/simple-redis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aileshe%2Fsimple-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp11","redis"],"created_at":"2024-11-08T21:13:25.877Z","updated_at":"2026-05-15T13:01:48.385Z","avatar_url":"https://github.com/aileshe.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-redis\nsimple-redis  简单的Redis C++封装类\n\n## 下载安装:\n```\ngit clone https://github.com/aileshe/simple-redis.git\n```\n\n## 使用 DEMO:\n```\n#include \u003ciostream\u003e\n#include \u003cmemory\u003e\n#include \"SimpleRedis.hpp\"\nusing namespace std;\n\nint main(int argc, char **argv)\n{\n\ttry\n\t{\n\t\tunique_ptr\u003cSimpleRedis\u003e redis(new SimpleRedis);\n\t\tredisReply* reply = NULL;\n\n\t\t/* PING server */\n\t\treply = redis-\u003eexec(\"PING\");\n\t\tcout \u003c\u003c reply-\u003estr \u003c\u003c endl;\n\n\t\t/* Set a key */\n\t\treply = redis-\u003eexec(\"SET %s %s\", \"food\", \"hello word!\");\n\t\tcout \u003c\u003c reply-\u003estr \u003c\u003c endl;\n\n\t\t/* Get key */\n\t\treply = redis-\u003eexec(\"GET %s\", \"food\");\n\t\tcout \u003c\u003c reply-\u003estr \u003c\u003c endl;\n\n\t\t/* 发布与订阅 (pub/sub) */\n\t\t// 测试发布: \u003e publish _TEST_ \"hi Dejan!\"\n\t\treply = redis-\u003eexec(\"subscribe _TEST_\");\n\t\tredis-\u003efreeReply();\n\t\twhile (redisGetReply(redis-\u003eget(), (void **)\u0026reply) == REDIS_OK)\n\t\t{\n\t\t\tif (NULL == reply) return 0;\n\n\t\t\tif (reply-\u003etype == REDIS_REPLY_ARRAY)\n\t\t\t{\n\t\t\t\tfor (int i = 0; i \u003c reply-\u003eelements; i++)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"[%d] =\u003e %s \\n\", i, reply-\u003eelement[i]-\u003estr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 无需做任何清理... 就这么简单!!  -- Dejan\n\t}\n\tcatch (exception\u0026 e)\n\t{\n\t\tcout \u003c\u003c e.what() \u003c\u003c endl;\n\t}\n\n\n\treturn 0;\n}\n\n// Linux 下编译:\n// g++ main.cpp SimpleRedis.cpp -I ./ -I /usr/local/include/hiredis/ -l hiredis -std=c++11\n\n```\n## 联系方式\nAuthor: Dejan\n\nQQ: 673008865\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faileshe%2Fsimple-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faileshe%2Fsimple-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faileshe%2Fsimple-redis/lists"}