{"id":23107940,"url":"https://github.com/andrewdyer/predis-adaptor","last_synced_at":"2026-02-27T06:03:01.681Z","repository":{"id":56948009,"uuid":"144852307","full_name":"andrewdyer/predis-adaptor","owner":"andrewdyer","description":"A simple framework-agnostic caching solution using Redis","archived":false,"fork":false,"pushed_at":"2025-02-03T12:32:22.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T02:18:42.572Z","etag":null,"topics":["adaptor","framework-agnostic","php","predis","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/andrewdyer.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-08-15T12:49:06.000Z","updated_at":"2025-02-03T12:29:53.000Z","dependencies_parsed_at":"2023-02-14T17:01:37.723Z","dependency_job_id":null,"html_url":"https://github.com/andrewdyer/predis-adaptor","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewdyer%2Fpredis-adaptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewdyer%2Fpredis-adaptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewdyer%2Fpredis-adaptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewdyer%2Fpredis-adaptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewdyer","download_url":"https://codeload.github.com/andrewdyer/predis-adaptor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252601674,"owners_count":21774657,"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":["adaptor","framework-agnostic","php","predis","redis"],"created_at":"2024-12-17T01:16:28.536Z","updated_at":"2026-02-27T06:03:01.663Z","avatar_url":"https://github.com/andrewdyer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Predis Adaptor](https://public-assets.andrewdyer.rocks/images/covers/predis-adaptor.png)\n\n# 🗄️ Predis Adaptor\n\nA simple framework-agnostic caching solution using Redis.\n\n## 📄 License\n\nLicensed under the [MIT license](https://opensource.org/licenses/MIT) and is free for private or commercial projects.\n\n## ✨ Introduction\n\nPredis Adaptor provides a straightforward way to implement caching operations using Redis in any PHP application. The library offers an easy-to-use interface for storing, retrieving, and managing cached data, supports custom cache configurations, and provides flexible cache management methods.\n\n## 📥 Installation\n\n```bash\ncomposer require andrewdyer/predis-adaptor\n```\n\n## 🚀 Getting Started\n\nTo start using Predis Adaptor, you need to initialize the cache by creating a new instance of the `Cache` class with the necessary configuration options.\n\n```php\nuse Anddye\\PredisAdaptor\\Cache;\n\n$cache = new Cache([\n    'host'      =\u003e '',\n    'password'  =\u003e '',\n    'port'      =\u003e '',\n    'scheme'    =\u003e '',\n]);\n```\n\n### Supported Options\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| host | string | 127.0.0.1 | IP or hostname of the target server.  |\n| password | string | not set | Accepts a value used to authenticate with a Redis server protected by password with the `AUTH` command. |\n| port | string | 6379 | TCP/IP port of the target server. |\n| scheme | string | tcp | Specifies the protocol used to communicate with an instance of Redis. |\n\n## 📖 Usage\n\n### Client\n\nReturns the underlying Predis client instance.\n\n```php\n$client = $cache-\u003eclient();\n```\n\n### Delete\n\nDeletes the specified key from the cache.\n\n```php\n$cache-\u003edelete('my_key');\n```\n\n### Exists\n\nChecks if the specified key exists in the cache.\n\n```php\n$bool = $cache-\u003eexists('my_key');\n```\n\n### Get\n\nRetrieves the value of the specified key from the cache.\n\n```php\n$value = $cache-\u003eget('my_key');\n```\n\n### Put\n\nStores a value in the cache with the specified key.\n\n```php\n$cache-\u003eput('my_key', 'my_value');\n```\n\n### Remember\n\nRetrieves the value of the specified key from the cache, or stores the result of the callback if the key does not exist.\n\n```php\n$value = $cache-\u003eremember('my_key', 10, function () {\n    return 'my_value';\n});\n```\n\n## Useful Links\n\n* [Redis](http://redis.io/)\n* [Predis](https://github.com/nrk/predis)\n* [Install and config Redis on Mac OS X via Homebrew](https://medium.com/@petehouston/install-and-config-redis-on-mac-os-x-via-homebrew-eb8df9a4f298)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewdyer%2Fpredis-adaptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewdyer%2Fpredis-adaptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewdyer%2Fpredis-adaptor/lists"}