{"id":15967325,"url":"https://github.com/lingyintech/yii2-predis","last_synced_at":"2026-04-30T01:32:44.146Z","repository":{"id":62517301,"uuid":"127635704","full_name":"LingyinTech/yii2-predis","owner":"LingyinTech","description":"yii2-predis","archived":false,"fork":false,"pushed_at":"2019-02-01T09:32:10.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T23:18:46.843Z","etag":null,"topics":["predis","yii2-extension"],"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/LingyinTech.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}},"created_at":"2018-04-01T14:17:42.000Z","updated_at":"2019-05-05T13:20:24.000Z","dependencies_parsed_at":"2022-11-02T13:45:50.550Z","dependency_job_id":null,"html_url":"https://github.com/LingyinTech/yii2-predis","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LingyinTech%2Fyii2-predis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LingyinTech%2Fyii2-predis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LingyinTech%2Fyii2-predis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LingyinTech%2Fyii2-predis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LingyinTech","download_url":"https://codeload.github.com/LingyinTech/yii2-predis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247184526,"owners_count":20897788,"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":["predis","yii2-extension"],"created_at":"2024-10-07T18:22:30.011Z","updated_at":"2026-04-30T01:32:44.106Z","avatar_url":"https://github.com/LingyinTech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yii2-predis\n\n在yii2 框架中使用 predis , 支持cluster,sentinel\n\n## 安装\n\n```\ncomposer require lingyin/predis\n```\n\n## 配置\n\n```\nreturn [\n    'components' =\u003e\n        'cache' =\u003e [\n            'class' =\u003e \\lingyin\\predis\\Cache::class,\n            'keyPrefix' =\u003e 'lingyin-common:',\n            'redis' =\u003e [\n                'parameters' =\u003e [\n                    [\n                        'host' =\u003e '127.0.0.1',\n                        'port' =\u003e 6380,\n                    ],\n                    [\n                        'host' =\u003e '127.0.0.1',\n                        'port' =\u003e 6381,\n                    ],\n                ],\n                'options' =\u003e [\n                    'replication' =\u003e 'sentinel',\n                    'service' =\u003e 'sentinel-127.0.0.1-6380',\n                    'parameters' =\u003e [\n                        'password' =\u003e 'profileLogStash',\n                        'database' =\u003e 4,\n                    ]\n                ],\n            ]\n        ]\n    ]\n```\n\n## 使用\n\n```\n// set \n$result = Yii::$app-\u003ecache-\u003eset('test','test',600);  \n\n// get\n$value = Yii::$app-\u003ecache-\u003eget('test');\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingyintech%2Fyii2-predis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flingyintech%2Fyii2-predis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingyintech%2Fyii2-predis/lists"}