{"id":16954635,"url":"https://github.com/tarkhov/eloquent-cache","last_synced_at":"2025-04-11T21:44:46.078Z","repository":{"id":57065239,"uuid":"118229040","full_name":"tarkhov/eloquent-cache","owner":"tarkhov","description":"Laravel Eloquent model auto caching.","archived":false,"fork":false,"pushed_at":"2022-01-13T00:26:22.000Z","size":12,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T17:49:25.232Z","etag":null,"topics":["cache","composer","database","db","laravel","orm","php"],"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/tarkhov.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-01-20T09:31:55.000Z","updated_at":"2022-01-12T06:57:52.000Z","dependencies_parsed_at":"2022-08-24T14:53:57.368Z","dependency_job_id":null,"html_url":"https://github.com/tarkhov/eloquent-cache","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkhov%2Feloquent-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkhov%2Feloquent-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkhov%2Feloquent-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkhov%2Feloquent-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarkhov","download_url":"https://codeload.github.com/tarkhov/eloquent-cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487510,"owners_count":21112187,"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","composer","database","db","laravel","orm","php"],"created_at":"2024-10-13T22:10:11.422Z","updated_at":"2025-04-11T21:44:46.054Z","avatar_url":"https://github.com/tarkhov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eloquent cache\n\nLaravel Eloqeunt model auto caching.\n\n### Contents\n\n1. [Compatibility](#compatibility)\n2. [Installation](#installation)\n   1. [Composer](#composer)\n3. [Usage](#usage)\n   1. [Inherit model](#inherit-model)\n4. [Author](#author)\n5. [License](#license)\n\n## Compatibility\n\nLibrary | Version\n------- | -------\nLaravel | 5.5\n\n## Installation\n\n### Composer\n\n```bash\ncomposer require tarkhov/eloquent-cache\n```\n\n## Usage\n\n### Inherit model\n\nStart using caching features by inheriting `CacheModel` class.\n\n```php\n\u003c?php\nnamespace App;\n\nuse EloquentCache\\Database\\Eloquent\\CacheModel;\n\nclass Post extends CacheModel\n{\n    protected $fillable = [\n        'category_id',\n        'title',\n        'description',\n    ];\n\n    public function category()\n    {\n        return $this-\u003ebelongsTo('App\\Category', 'category_id');\n    }\n}\n```\n\n```php\n\u003c?php\nnamespace App;\n\nuse EloquentCache\\Database\\Eloquent\\CacheModel;\n\nclass Category extends CacheModel\n{\n    protected $cacheTags = ['category'];\n    protected $fillable = [\n        'title',\n        'description',\n    ];\n}\n```\n\n## Author\n\n**Alexander Tarkhov**\n\n* [Facebook](https://www.facebook.com/alex.tarkhov)\n* [Twitter](https://twitter.com/alextarkhov)\n* [Medium](https://medium.com/@tarkhov)\n* [LinkedIn](https://www.linkedin.com/in/tarkhov/)\n\n## License\n\nThis project is licensed under the **MIT License** - see the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarkhov%2Feloquent-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarkhov%2Feloquent-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarkhov%2Feloquent-cache/lists"}