{"id":26018617,"url":"https://github.com/pardnchiu/php-redis","last_synced_at":"2025-03-06T06:32:02.973Z","repository":{"id":275483905,"uuid":"926218130","full_name":"pardnchiu/PHP-Redis","owner":"pardnchiu","description":"PD\\Redis is a PHP Redis client wrapper built on Predis, offering simplified Redis operations with automatic connection management.","archived":false,"fork":false,"pushed_at":"2025-02-03T08:29:28.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T23:05:19.194Z","etag":null,"topics":["pardnchiu","pardnio","pardnltd","php-composer","php-library","redis"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pardnchiu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2025-02-02T20:27:25.000Z","updated_at":"2025-02-03T08:27:16.000Z","dependencies_parsed_at":"2025-02-09T00:15:09.460Z","dependency_job_id":null,"html_url":"https://github.com/pardnchiu/PHP-Redis","commit_stats":null,"previous_names":["pardnchiu/php-redis"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnchiu%2FPHP-Redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnchiu%2FPHP-Redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnchiu%2FPHP-Redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardnchiu%2FPHP-Redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pardnchiu","download_url":"https://codeload.github.com/pardnchiu/PHP-Redis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242161571,"owners_count":20081896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["pardnchiu","pardnio","pardnltd","php-composer","php-library","redis"],"created_at":"2025-03-06T06:31:20.413Z","updated_at":"2025-03-06T06:32:02.961Z","avatar_url":"https://github.com/pardnchiu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PD\\Redis\n\n\u003e PD\\Redis is a PHP Redis client wrapper built on Predis, offering simplified Redis operations with automatic connection management.\n\n![tag](https://img.shields.io/badge/tag-PHP%20Library-bb4444) \n![size](https://img.shields.io/github/size/pardnchiu/PHP-Redis/src/Redis.php)\u003cbr\u003e\n![version](https://img.shields.io/packagist/v/pardnchiu/redis)\n![download](https://img.shields.io/packagist/dm/pardnchiu/redis)\n\n## Features\n\n- Automatic connection management\n- Environment-based configuration\n- Persistent connection support\n- Automatic database selection\n- Built-in error handling\n- Connection state monitoring\n- Automatic cleanup on destruction\n\n## Key Capabilities\n\n- Simple get/set operations with database selection\n- Automatic connection retry mechanism\n- Expiration time management\n- Connection status checking\n- Environment variables configuration\n- Persistent connection support\n\n## Required Environment Variables\n\n```SHELL\nREDIS_HOST=localhost    # Required: Redis server host\nREDIS_PORT=6379         # Required: Redis server port\nREDIS_PASSWORD=secret   # Optional: Redis server password\n```\n\n## How to Use\n\n### Install\n\n```SHELL\ncomposer require pardnchiu/redis\n```\n\n```PHP\n// Initialize Redis client\n$redis = new PD\\Redis();\n\n// Set value with expiration\n$redis-\u003eset(0, \"user:123\", \"user_data\", 3600); // db 0, expires in 1 hour\n\n// Get value\n$data = $redis-\u003eget(0, \"user:123\"); // from db 0\n\n// Check connection status\nif ($redis-\u003eisConnected()) {\n    // Redis is connected and ready\n}\n```\n\n## License\n\nThis source code project is licensed under the [MIT](https://github.com/pardnchiu/PHP-Redis/blob/main/LICENSE) license.\n\n## Creator\n\n\u003cimg src=\"https://avatars.githubusercontent.com/u/25631760\" align=\"left\" width=\"96\" height=\"96\" style=\"margin-right: 0.5rem;\"\u003e\n\n\u003ch4 style=\"padding-top: 0\"\u003e邱敬幃 Pardn Chiu\u003c/h4\u003e\n\n\u003ca href=\"mailto:dev@pardn.io\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://pardn.io/image/email.svg\" width=\"48\" height=\"48\"\u003e\n\u003c/a\u003e \u003ca href=\"https://linkedin.com/in/pardnchiu\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://pardn.io/image/linkedin.svg\" width=\"48\" height=\"48\"\u003e\n\u003c/a\u003e\n\n***\n\n©️ 2024 [邱敬幃 Pardn Chiu](https://pardn.io)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpardnchiu%2Fphp-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpardnchiu%2Fphp-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpardnchiu%2Fphp-redis/lists"}