{"id":18794575,"url":"https://github.com/effectra/cache","last_synced_at":"2025-12-29T18:30:14.228Z","repository":{"id":180684920,"uuid":"663459146","full_name":"effectra/cache","owner":"effectra","description":"Effectra\\Cache is a package that provides cache implementations based on the PSR-16 (Simple Cache) standard. It includes cache classes that can be used to store and retrieve data in various cache storage systems.","archived":false,"fork":false,"pushed_at":"2023-07-12T13:11:40.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-01-15T06:01:22.952Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/effectra.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-07T10:40:33.000Z","updated_at":"2023-07-12T12:14:48.000Z","dependencies_parsed_at":"2023-07-28T02:15:30.647Z","dependency_job_id":null,"html_url":"https://github.com/effectra/cache","commit_stats":null,"previous_names":["effectra/cache"],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/effectra","download_url":"https://codeload.github.com/effectra/cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239718733,"owners_count":19685806,"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":[],"created_at":"2024-11-07T21:29:50.126Z","updated_at":"2025-12-29T18:30:14.153Z","avatar_url":"https://github.com/effectra.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Effectra\\Cache\n\nEffectra\\Cache is a package that provides cache implementations based on the PSR-16 (Simple Cache) standard. It includes cache classes that can be used to store and retrieve data in various cache storage systems.\n\n## Features\n\n- PSR-16 compatibility: Implements the `Psr\\SimpleCache\\CacheInterface`.\n- Easy integration: Provides cache implementations for different cache storage systems.\n- Flexible configuration: Supports different cache configurations based on the chosen storage system.\n- Clean and simple API: Offers a straightforward API for caching data.\n\n## Installation\n\nYou can install the package via Composer. Run the following command in your project directory:\n\n```bash\ncomposer require effectra/cache\n```\n\n## Usage\n\nThe package includes various cache classes, each representing a different cache storage system. You can use the desired cache class based on your requirements. Here's an example of using the `JsonCache` class:\n\n```php\nuse Effectra\\Cache\\Psr16\\JsonCache;\n\n// Create an instance of the JsonCache class with the cache directory\n$cache = new JsonCache('/path/to/cache/directory');\n\n// Store a value in the cache with a key and optional time-to-live (TTL)\n$cache-\u003eset('key', 'value', 3600); // Cache value with a TTL of 1 hour\n\n// Retrieve a value from the cache\n$result = $cache-\u003eget('key');\n\n// Delete a value from the cache\n$cache-\u003edelete('key');\n\n// Clear the entire cache\n$cache-\u003eclear();\n```\n\n## Available Cache Classes\n\n- `FileCache`: Stores cache data in individual files on the file system.\n- `JsonCache`: Stores cache data in JSON files on the file system.\n- `RedisCache`: Stores cache data in a Redis server.\n\nPlease refer to the respective class documentation and the PSR-16 specification for more details on the methods and usage.\n\n## Requirements\n\n- PHP \u003e= 7.2\n- Composer (for installation)\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.\n\n## License\n\nThis package is open source and available under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Fcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffectra%2Fcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Fcache/lists"}