2017 © Pedro Peláez
 

library eloquent-faster

Simple none-I/O cache for eloquent model configs, like mutators and accessors.

image

reshadman/eloquent-faster

Simple none-I/O cache for eloquent model configs, like mutators and accessors.

  • Sunday, October 4, 2015
  • by bigsinoos
  • Repository
  • 2 Watchers
  • 5 Stars
  • 1,908 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

Eloquent Faster

Simple none-I/O cache for eloquent model accessor and mutators., (*1)

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads, (*2)

Installation

composer require "reshadman/eloquent-faster"

Usage

First you need to add the following service provider to your application, (*3)

return [
     //.. other config

     'providers' => [
        // other providers
        \Reshadman\EloquentFaster\EloquentFasterServiceProvider::class
     ]

];

Then run the following artisan command, (*4)

php artisan eloquent:cache

For clearing cache, (*5)

php artisan eloquent:clear

If you use OPCACHE in your PHP installation, this class will not use I/O for each script run, as opcache loads code into memory., (*6)

Problem

Simply the problem begins from this issuge., (*7)

Currently 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. This occurs only once per unique eloquent final object. The getter cache container is only filled up with the processed snake case attribute key., (*8)

Each time a new model class is created for first time a loop with 50 to 100 iterations with processing a regular expression is run., (*9)

Wouldn't it be cool to have something like php artisan eloquent:cache for this ?, (*10)

Running unit tests

Clone the repo, (*11)

git clone git@github.com:reshadman/eloquent-faster.git

Then run composer update, (*12)

Now you can run phpunit in the repo folder., (*13)

vendor/bin/phpunit

The Versions

04/10 2015

dev-master

9999999-dev

Simple none-I/O cache for eloquent model configs, like mutators and accessors.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Reza Shadman

15/06 2015

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1

Simple none-I/O cache for eloquent model configs, like mutators and accessors.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Reza Shadman

15/06 2015

1.0.1

1.0.1.0

Simple none-I/O cache for eloquent model configs, like mutators and accessors.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Reza Shadman

15/06 2015

1.0.0

1.0.0.0

Simple none-I/O cache for eloquent model configs, like mutators and accessors.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Reza Shadman