{"id":36986239,"url":"https://github.com/rethinkphp/blink-redis","last_synced_at":"2026-01-13T23:04:11.222Z","repository":{"id":62495144,"uuid":"89610435","full_name":"rethinkphp/blink-redis","owner":"rethinkphp","description":"A Redis component for the Blink Framework","archived":false,"fork":false,"pushed_at":"2025-09-05T03:15:59.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T22:07:42.309Z","etag":null,"topics":["blink","blink-framework","cache","php","psr-16","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/rethinkphp.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":"2017-04-27T15:06:15.000Z","updated_at":"2018-08-14T08:02:06.000Z","dependencies_parsed_at":"2024-01-10T06:06:20.074Z","dependency_job_id":"22f7dd2f-1245-4cb7-afc6-01c7865627c2","html_url":"https://github.com/rethinkphp/blink-redis","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rethinkphp/blink-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rethinkphp%2Fblink-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rethinkphp%2Fblink-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rethinkphp%2Fblink-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rethinkphp%2Fblink-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rethinkphp","download_url":"https://codeload.github.com/rethinkphp/blink-redis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rethinkphp%2Fblink-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"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":["blink","blink-framework","cache","php","psr-16","redis"],"created_at":"2026-01-13T23:04:10.521Z","updated_at":"2026-01-13T23:04:11.213Z","avatar_url":"https://github.com/rethinkphp.png","language":"PHP","readme":"# A Redis component for the Blink Framework\n\n[![Build Status](https://travis-ci.org/rethinkphp/blink-redis.svg?branch=master)](https://travis-ci.org/rethinkphp/blink-redis)\n[![Latest Stable Version](https://poser.pugx.org/blink/redis/v/stable)](https://packagist.org/packages/blink/redis)\n[![Latest Unstable Version](https://poser.pugx.org/blink/redis/v/unstable)](https://packagist.org/packages/blink/redis)\n\n## Features\n\n* A Redis Client compatible with [Predis](https://github.com/nrk/predis) API\n* Implemented PSR-16 SampleCache\n* A Session Storage class to store sessions into redis\n\n## Installation \n\nYou can install the latest version of blink-redis by using Composer:\n\n```\ncomposer require blink/redis:dev-master\n```\n\n## Documentation\n\n### Configuring a redis service\n\nYou can easily configure a redis service in the services definition file which located to `src/config/services.php` by default. \n\nThe following is a sample example:\n\n```php\n'redis' =\u003e [\n    'class' =\u003e blink\\redis\\Client::class,\n    'servers' =\u003e ['tcp://127.0.0.1:6379'],\n]\n```\n\nOnce the redis service configured, we can access redis server through `app()-\u003eredis` in our application. As \nthe Redis component is based on [Predis](https://github.com/nrk/predis), you can refer their documentation on\nhow to issue command to redis servers.\n\n### Using redis as a cache service\n\nThe component provides a PSR-16 SampleCache implementation which using redis as a cache storage. We can define \na cache service in `services.php` likes the folowing:\n\n```php\n'cache' =\u003e [\n    'class' =\u003e blink\\redis\\cache\\SampleCache::class,\n    'redis' =\u003e 'redis', // The redis service to store cached data\n    'prefix' =\u003e '',     // The prefix of cached key\n]\n```\n\nOnce the cache service configured, we can access the cache service through `app()-\u003ecache` in our application.\n\n\n### Using redis as session storage\n\nThe component also provides a Session Storgae class which allows Blink to store application sessions into redis.\nwe can configure the session storage in the following way:\n\n```php\n'session' =\u003e [\n    'class' =\u003e blink\\session\\Manager::class,\n    'expires' =\u003e 3600 * 24 * 15,\n    'storage' =\u003e [\n        'class' =\u003e blink\\redis\\session\\Storage::class,\n        'redis' =\u003e 'redis',  // the redis service to store sessions\n    ]\n],\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frethinkphp%2Fblink-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frethinkphp%2Fblink-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frethinkphp%2Fblink-redis/lists"}