{"id":14987189,"url":"https://github.com/codeigniter4/cache","last_synced_at":"2025-10-15T23:35:43.228Z","repository":{"id":37660816,"uuid":"367516971","full_name":"codeigniter4/cache","owner":"codeigniter4","description":"PSR-6 and PSR-16 Cache Adapters for CodeIgniter 4 ","archived":false,"fork":false,"pushed_at":"2024-11-11T12:04:31.000Z","size":157,"stargazers_count":11,"open_issues_count":3,"forks_count":4,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-09-29T12:40:54.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/codeigniter4.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-15T01:40:35.000Z","updated_at":"2025-05-25T19:28:27.000Z","dependencies_parsed_at":"2024-04-06T00:28:50.165Z","dependency_job_id":"4a2d79c7-b245-4047-9cae-d15ccd7848d0","html_url":"https://github.com/codeigniter4/cache","commit_stats":{"total_commits":69,"total_committers":5,"mean_commits":13.8,"dds":0.6521739130434783,"last_synced_commit":"5305427bdc3836bcf7c39ef05e963815f75e9dc6"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codeigniter4/cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4%2Fcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4%2Fcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4%2Fcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4%2Fcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeigniter4","download_url":"https://codeload.github.com/codeigniter4/cache/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4%2Fcache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279129087,"owners_count":26109902,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"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":[],"created_at":"2024-09-24T14:14:13.849Z","updated_at":"2025-10-15T23:35:43.198Z","avatar_url":"https://github.com/codeigniter4.png","language":"PHP","readme":"# CodeIgniter 4 PSR Cache\n\nPSR-6 and PSR-16 Cache Adapters for CodeIgniter 4\n\n[![](https://github.com/codeigniter4/cache/workflows/PHPUnit/badge.svg)](https://github.com/codeigniter4/cache/actions/workflows/phpunit.yml)\n[![](https://github.com/codeigniter4/cache/workflows/PHPStan/badge.svg)](https://github.com/codeigniter4/cache/actions/workflows/phpstan.yml)\n[![](https://github.com/codeigniter4/cache/workflows/Deptrac/badge.svg)](https://github.com/codeigniter4/cache/actions/workflows/deptrac.yml)\n[![Coverage Status](https://coveralls.io/repos/github/codeigniter4/cache/badge.svg?branch=develop)](https://coveralls.io/github/codeigniter4/cache?branch=develop)\n\n**Disclaimer: CodeIgniter 4 comes with a fully-functional cache component! This module\nis only for integrating third-party packages that rely on the PSR interface provisions.**\n\n## Quick Start\n\n1. Install with Composer: `\u003e composer require codeigniter4/cache`\n2. Integrate with your favorite packages:\n\n```php\nuse CodeIgniter\\Psr\\Cache\\SimpleCache;\nuse Kreait\\Firebase\\Factory;\n...\n\n$factory = (new Factory)-\u003ewithVerifierCache(new SimpleCache());\n```\n\n## Features\n\nA set of adapters fully-compliant with PSR-6 and PSR-16 to integrate with CodeIgniter 4's Caching Driver.\n\n## Installation\n\nInstall easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities\nand always be up-to-date:\n\n* `\u003e composer require codeigniter4/cache`\n\nOr, install manually by downloading the source files and adding the directory to\n`app/Config/Autoload.php`.\n\n## Usage\n\nThis module has adapters for CodeIgniter 4 to supply the following FIG PHP Standards Recommendations (PSR):\n* [Caching Interface](https://www.php-fig.org/psr/psr-6)\n* [Simple Cache](https://www.php-fig.org/psr/psr-16)\n\nIf you just need a caching agent then you should use the framework's native [Caching Driver](https://codeigniter4.github.io/CodeIgniter4/libraries/caching.html).\nThese adapters are intended to integrate with any library or project that requires either of the following:\n\n* [psr/cache-implementation](https://packagist.org/packages/psr/cache/dependents?order_by=downloads)\n* [psr/simple-cache-implementation](https://packagist.org/packages/psr/simple-cache/dependents?order_by=downloads)\n\nThe interfaces are provided by the following classes:\n\n* `Psr\\Cache\\CacheItemInterface` provided by `CodeIgniter\\Psr\\Cache\\Item`\n* `Psr\\Cache\\CacheItemPoolInterface` provided by `CodeIgniter\\Psr\\Cache\\Pool`\n* `Psr\\SimpleCache\\CacheInterface` provided by `CodeIgniter\\Psr\\Cache\\SimpleCache`\n\nBy default the adapters (`Pool` and `SimpleCache`) will work with the Caching Driver as defined\nin you cache configuration (e.g. **app/Config/Cache.php**). You may create either driver explicitly\nwith an alternative Cache Handler or Config:\n\n```php\n    $sharedCacheServicePool = new \\CodeIgniter\\Psr\\Cache\\Pool();\n\n    $fileHandler = new \\CodeIgniter\\Cache\\Handlers\\FileHandler(config('Cache'));\n    $explicitFileHandlerSimpleCache = new \\CodeIgniter\\Psr\\Cache\\SimpleCache($fileHandler);\n\n    $config = config('Cache');\n    $config-\u003eprefix = 'banana-';\n    $alternativeConfigPool = new \\CodeIgniter\\Psr\\Cache\\Pool($config);\n```\n\n## Testing\n\nTesting of the underlying Caching Driver is handled in the [CodeIgniter 4 repo](https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests/system/Cache).\nThese adapters are tested with the [PHP Cache Integration Tests](https://github.com/php-cache/integration-tests), by Aaron Scherer.\nYou may run the test suite by cloning this repo, installing all dependencies, and running:\n\n* `\u003e composer test`\n","funding_links":[],"categories":["Utilities"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeigniter4%2Fcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeigniter4%2Fcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeigniter4%2Fcache/lists"}