{"id":28052653,"url":"https://github.com/fredbradley/cacher","last_synced_at":"2025-05-12T02:16:22.479Z","repository":{"id":53057429,"uuid":"278584366","full_name":"fredbradley/cacher","owner":"fredbradley","description":"A multi-framework compatible caching interface","archived":false,"fork":false,"pushed_at":"2022-04-13T16:06:01.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-12T02:16:15.645Z","etag":null,"topics":["cache","caching","laravel","wordpress"],"latest_commit_sha":null,"homepage":"https://git.fred.im/cacher","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/fredbradley.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-10T08:45:35.000Z","updated_at":"2022-04-13T16:05:37.000Z","dependencies_parsed_at":"2022-08-24T04:51:02.148Z","dependency_job_id":null,"html_url":"https://github.com/fredbradley/cacher","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredbradley%2Fcacher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredbradley%2Fcacher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredbradley%2Fcacher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredbradley%2Fcacher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fredbradley","download_url":"https://codeload.github.com/fredbradley/cacher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253660887,"owners_count":21943826,"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":["cache","caching","laravel","wordpress"],"created_at":"2025-05-12T02:16:21.879Z","updated_at":"2025-05-12T02:16:22.468Z","avatar_url":"https://github.com/fredbradley.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi Framework Cacher Script\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/fredbradley/cacher.svg?style=flat-square)](https://packagist.org/packages/fredbradley/cacher)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n![StyleCI Status](https://github.styleci.io/repos/278584366/shield)\n[![Total Downloads](https://img.shields.io/packagist/dt/fredbradley/cacher.svg?style=flat-square)](https://packagist.org/packages/fredbradley/cacher)\n\nIn my day job, I work regularly with both Laravel and WordPress. I also make packages that are needed to be compatible with both. It becomes a right pain, when it comes to caching, to write out if statements for each framework. So I created this small script which does that for me.    \n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require fredbradley/cacher\n```\n\n## Usage\n\n``` php\nuse FredBradley\\Cacher;\n\nCacher::remember('cache_key_name', 300, function() {\n    // Your logic\n    $value = \"value\";\n    return $value;\n});\n\n/*\n * Will set the value of 'cache_key_name' to the return value of the Closure callback and \n * save in the cache for 5 minutes (300 seconds)\n */\n```\n\nThere's only a small handful of methods in the one class. It's really basic, but amazingly wonderful!\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email code@fredbradley.co.uk instead of using the issue tracker.\n\n## Credits\n\n- [Fred Bradley](https://github.com/fredbradley)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredbradley%2Fcacher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffredbradley%2Fcacher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredbradley%2Fcacher/lists"}