{"id":36976973,"url":"https://github.com/reshadman/eloquent-faster","last_synced_at":"2026-01-13T22:45:48.886Z","repository":{"id":62535037,"uuid":"37470201","full_name":"reshadman/eloquent-faster","owner":"reshadman","description":"Simple none-I/O cache for eloquent model mutator and accessor config.","archived":false,"fork":false,"pushed_at":"2015-10-04T07:08:21.000Z","size":180,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-09T17:10:23.235Z","etag":null,"topics":[],"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/reshadman.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":"2015-06-15T14:27:45.000Z","updated_at":"2017-09-03T23:15:20.000Z","dependencies_parsed_at":"2022-11-02T15:45:18.712Z","dependency_job_id":null,"html_url":"https://github.com/reshadman/eloquent-faster","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/reshadman/eloquent-faster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshadman%2Feloquent-faster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshadman%2Feloquent-faster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshadman%2Feloquent-faster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshadman%2Feloquent-faster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reshadman","download_url":"https://codeload.github.com/reshadman/eloquent-faster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshadman%2Feloquent-faster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-13T22:45:48.091Z","updated_at":"2026-01-13T22:45:48.877Z","avatar_url":"https://github.com/reshadman.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eloquent Faster\nSimple none-I/O cache for eloquent model accessor and mutators.\n\n[![Build Status](https://travis-ci.org/reshadman/eloquent-faster.svg?branch=master)](https://travis-ci.org/reshadman/eloquent-faster)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/reshadman/eloquent-faster/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/reshadman/eloquent-faster/?branch=master)\n[![Latest Stable Version](https://poser.pugx.org/reshadman/eloquent-faster/v/stable)](https://packagist.org/packages/reshadman/eloquent-faster)\n[![Total Downloads](https://poser.pugx.org/reshadman/eloquent-faster/downloads)](https://packagist.org/packages/reshadman/eloquent-faster)\n### Installation\n\n```php\ncomposer require \"reshadman/eloquent-faster\"\n```\n### Usage\n\nFirst you need to add the following service provider to your application\n\n```php\nreturn [\n     //.. other config\n\n     'providers' =\u003e [\n        // other providers\n        \\Reshadman\\EloquentFaster\\EloquentFasterServiceProvider::class\n     ]\n\n];\n```\n\nThen run the following artisan command\n```\nphp artisan eloquent:cache\n```\n\nFor clearing cache\n```\nphp artisan eloquent:clear\n```\n\n\u003eIf you use *OPCACHE* in your PHP installation, this class will not use I/O for each script run, as opcache loads code into memory.\n\n### Problem\nSimply the problem begins from [this issuge](https://github.com/laravel/framework/issues/9276).\n\n\n\u003eCurrently the eloquent model class contains a cache strategy for getters which first fetches all class methods and runs a loop on them filtering them by a regular expression.\nThis occurs [only once](https://github.com/laravel/framework/blob/5.1/src/Illuminate/Database/Eloquent/Model.php#L3207) per unique eloquent final object.\nThe getter cache container is only filled up with the [processed snake case attribute key](https://github.com/laravel/framework/blob/5.1/src/Illuminate/Database/Eloquent/Model.php#L3238).\n\n\u003eEach time a new model class is created for first time a loop with 50 to 100 iterations with processing a regular expression is run.\n\n\u003eWouldn't it be cool to have something like ```php artisan eloquent:cache``` for this ?\n\n### Running unit tests\n\nClone the repo\n\n```\ngit clone git@github.com:reshadman/eloquent-faster.git\n```\n\nThen run ```composer update```\n\nNow you can run phpunit in the repo folder.\n```\nvendor/bin/phpunit\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freshadman%2Feloquent-faster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freshadman%2Feloquent-faster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freshadman%2Feloquent-faster/lists"}