{"id":14971307,"url":"https://github.com/nuwber/yii2-phpredis","last_synced_at":"2025-10-01T16:31:08.845Z","repository":{"id":48726790,"uuid":"193889590","full_name":"nuwber/yii2-phpredis","owner":"nuwber","description":"Redis Cache and Session for Yii2","archived":false,"fork":true,"pushed_at":"2021-07-13T10:03:32.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T11:12:29.293Z","etag":null,"topics":["phpredis","redis","yii2","yii2-extension"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dcb9/yii2-phpredis","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuwber.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}},"created_at":"2019-06-26T11:15:54.000Z","updated_at":"2021-07-13T10:02:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nuwber/yii2-phpredis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuwber%2Fyii2-phpredis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuwber%2Fyii2-phpredis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuwber%2Fyii2-phpredis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuwber%2Fyii2-phpredis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuwber","download_url":"https://codeload.github.com/nuwber/yii2-phpredis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234882629,"owners_count":18901301,"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":["phpredis","redis","yii2","yii2-extension"],"created_at":"2024-09-24T13:45:00.068Z","updated_at":"2025-10-01T16:31:08.529Z","avatar_url":"https://github.com/nuwber.png","language":"PHP","readme":"Redis Cache and Session for Yii2\n======================\nThis extension provides the [redis](http://redis.io/) key-value store support for the [Yii framework 2.0](http://www.yiiframework.com).\n\nIt includes a `Cache` and `Session` storage handler in redis.\n\n[![Build](https://github.com/nuwber/yii2-phpredis/actions/workflows/build.yml/badge.svg)](https://github.com/nuwber/yii2-phpredis/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/nuwber/yii2-phpredis/branch/master/graph/badge.svg?token=87YQF09NJ4)](https://codecov.io/gh/nuwber/yii2-phpredis)\n\n**Notice: THIS REPO DOES NOT SUPPORT ACTIVE RECORD.**\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```bash\ncomposer require --prefer-dist nuwber/yii2-phpredis\n```\n\nor add\n\n```json\n\"nuwber/yii2-phpredis\": \"^2.0\"\n```\n\nto the require section of your composer.json.\n\n\nConfiguration\n-------------\n\nTo use this extension, you have to configure the Connection class in your application configuration:\n\n```php\nreturn [\n    'components' =\u003e [\n        'redis' =\u003e [\n            'class' =\u003e \\nuwber\\yii2redis\\Connection::class,\n            'hostname' =\u003e 'localhost',\n            'port' =\u003e 6379,\n            'database' =\u003e 0,\n        ],\n        'cache' =\u003e [\n            'class' =\u003e \\nuwber\\yii2redis\\Cache::class,\n        ],\n        'session' =\u003e [\n            'class' =\u003e \\nuwber\\yii2redis\\Session::class,\n        ],\n    ],\n];\n```\n\nRun unit test\n-------------\n\nYou can specific your redis config\n\n```bash\n$ cp tests/config.php tests/config-local.php\n```\n\nand Run\n\n```bash\n$ ./vendor/bin/phpunit\n```\n\nPerformance test\n------------------\n\n```\n$ php tests/performance.php\n```\n\n![phpredis-vs-yii-redis](./phpredis-vs-yii-redis.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuwber%2Fyii2-phpredis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuwber%2Fyii2-phpredis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuwber%2Fyii2-phpredis/lists"}