{"id":34017225,"url":"https://github.com/toanppp/php-redis-lock","last_synced_at":"2026-04-19T20:33:02.683Z","repository":{"id":57679438,"uuid":"492389491","full_name":"toanppp/php-redis-lock","owner":"toanppp","description":"Access synchronization mechanism","archived":false,"fork":false,"pushed_at":"2023-03-18T08:51:40.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T14:43:24.953Z","etag":null,"topics":["distributed-lock","php","redis"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/toanppp/php-redis-lock","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/toanppp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-15T04:46:52.000Z","updated_at":"2023-03-18T08:54:07.000Z","dependencies_parsed_at":"2022-09-14T03:00:24.746Z","dependency_job_id":null,"html_url":"https://github.com/toanppp/php-redis-lock","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/toanppp/php-redis-lock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toanppp%2Fphp-redis-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toanppp%2Fphp-redis-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toanppp%2Fphp-redis-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toanppp%2Fphp-redis-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toanppp","download_url":"https://codeload.github.com/toanppp/php-redis-lock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toanppp%2Fphp-redis-lock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32022049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["distributed-lock","php","redis"],"created_at":"2025-12-13T14:29:06.196Z","updated_at":"2026-04-19T20:33:02.678Z","avatar_url":"https://github.com/toanppp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Redis Lock\n\n## About\nAccess synchronization mechanism.\n\n## Installation\n\n```shell\ncomposer require toanppp/php-redis-lock\n```\n\n## Methods\n\n### RedisLock :: getInstance ( `string` host, `int` port )\nCreate or get singleton instance of RedisLock.\n\n```php\n$redisLockInstance = RedisLock::getInstance('127.0.0.1', 6379);\n```\n\n### RedisLock :: acquire ( `string` key, `string` | `null` type = `null` )\nLock a key, with or without type.\n\n```php\n$redisLockInstance-\u003eacquire('key');\n```\n\n### RedisLock :: release ( `string` key )\nRelease a key.\n\n```php\n$redisLockInstance-\u003erelease('key');\n```\n\n### RedisLock :: releaseByType ( `string` type )\nRelease a key by type.\n\n```php\n$type = 'uniqueKey';\n$redisLockInstance-\u003eacquire(uniqid(), $type);\n\n$redisLockInstance-\u003ereleaseByType($type);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoanppp%2Fphp-redis-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoanppp%2Fphp-redis-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoanppp%2Fphp-redis-lock/lists"}