Code Monkey home page Code Monkey logo

laravel-opcache's People

Contributors

elcobvg avatar jackwakefield avatar jonasraoni avatar romagilyov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

laravel-opcache's Issues

Package installed in php 8 version instead my version (php7.4)

Hey guys,

I installed this package on ubuntu 18.04, PHP 7.4, and Laravel 8.1.

everything is ok except for one thing. when I want to run the PHP artisan opcache:compile command line says

# php artisan opcache:compile
Compiling scripts...

   Illuminate\Http\Client\RequestException

  HTTP request returned status code 500:
<!doctype html>
<html class="theme-light">
<!--
ParseError: syntax error, unexpected 'private' (T_PRIVATE), expecting va (truncated...)

  at vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:288
    284▕      */
    285▕     public function toException()
    286▕     {
    287▕         if ($this->failed()) {
  ➜ 288▕             return new RequestException($this);
    289▕         }
    290▕     }
    291▕
    292▕     /**

      +15 vendor frames
  16  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

I checked the contained file and realized OMG this is the PHP 8.* syntax.

Laravel 7.x compatibility

As of Laravel 5.8, str helper classes are deprecated.

laravel/framework#26898

The constructor still uses str_slug.

$this->prefix = str_slug($prefix ?: config('app.name', 'opcache'), '-');

Can this please be updated to use Str::slug instead?

Class 'ElcoBvG\Opcache\Model' not found

hi,
very excited to use this, but when i do this:

//use Illuminate\Database\Eloquent\Model;
use ElcoBvG\Opcache\Model;

i get:

Class 'ElcoBvG\Opcache\Model' not found

thanks

Typo in readme

The instruction to register the service provider shows the wrong class name.

File count limits?

I noticed that unlike the File cache, there is no folder structure created for the files. Does this mean there may be an IO overhead when caching millions of key/value pairs?

Extend Eloquent Model & Builder.

To enable caching of full Eloquent models, the base class needs to be extended with a __set_state method.
For retrievable storage of paged results, the Builder and Paginator need to be extended as well.

$model->delete() fails

$model->delete() fails for some reason.

same exact code works fine with apc activated in .env and laravel-opcache still installed and without reverting

use ElcoBvg\Opcache\Model;

back to

use Illuminate\Database\Eloquent\Model;

. i thought cache flush wasn't working at first, but the row is not actually being deleted.

thanks

WhiteFile() receiving float instead int

I'm running my application with opcache, and give this error:

Type error: Argument 2 passed to ElcoBvg\Opcache\Store::writeFile() must be of the type integer, float given, called in \vendor\elcobvg\laravel-opcache\src\Store.php on line 104

The fix is just cast the $expiration before send, but I don't know what is the real problem, if it's mine...

What's the deal?

Use seconds instead of minutes

Hi @elcobvg!

The package is working like a charm, so we'll use it in our open source publishing softwares, I just found one issue:

Laravel is passing down seconds to the driver, but the package is currently interpreting the values as minutes.

ps: As you said you're currently with few time to deal with open-source, I'll submit a PR to address this issue and a small change to improve a bit the performance.

Call to undefined method App\Models\Page::__set_state()

Uncaught BadMethodCallException: Call to undefined method App\Models\Page::__set_state() in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50

Stack trace: #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(36): Illuminate\Database\Eloquent\Model::throwBadMethodCallException('__set_state') #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1614): Illuminate\Database\Eloquent\Model->forwardCallTo(Object(Illuminate\Database\Eloquent\Builder), '__set_state', Array) #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1626): Illuminate\Database\Eloquent\Model->__call('__set_state', Array) #3 /var/www/html/storage/framework/cache/data/unit3d-39b6f89872f56543cedea85d00a994d7150cbf29(6): Illuminate\Database\Eloquent\Model::__callStatic('__set_state', Array) #4 /var/www/html/vendor/elcobvg/laravel-opcache/src/Store.php(118): include('/var/www/html/s...') #5 /var/www/html/vend {"userId":3,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Uncaught BadMethodCallException: Call to undefined method App\\Models\\Page::__set_state() in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50 Stack trace: #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(36): Illuminate\\Database\\Eloquent\\Model::throwBadMethodCallException('__set_state') #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1614): Illuminate\\Database\\Eloquent\\Model->forwardCallTo(Object(Illuminate\\Database\\Eloquent\\Builder), '__set_state', Array) #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1626): Illuminate\\Database\\Eloquent\\Model->__call('__set_state', Array) #3 /var/www/html/storage/framework/cache/data/unit3d-39b6f89872f56543cedea85d00a994d7150cbf29(6): Illuminate\\Database\\Eloquent\\Model::__callStatic('__set_state', Array) #4 /var/www/html/vendor/elcobvg/laravel-opcache/src/Store.php(118): include('/var/www/html/s...') #5 /var/www/html/vend at /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50) [stacktrace] #0 {main} "}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.