Giter VIP home page Giter VIP logo

illuminate-psr-cache-bridge's People

Contributors

bramdevries avatar grahamcampbell avatar hannesvdvreken avatar nyholm avatar woutersioen 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

illuminate-psr-cache-bridge's Issues

Double serialization

I got this error when fetching an item from cache:

In CacheItemPool.php line 49:
unserialize(): Error at offset 0 of 2 bytes

Looking at the item that was being unserialized here, it was:

Illuminate\Support\Collection^ {#518
  #items: []
}

It was not a string. It was already deserialized. So looking into the code, it seems that this package will serialize and unserialize items that go into and come out of the Laravel/Illuminate cache. Laravel will serialize/unserialize data going in and out anyway, so it's done twice. Maybe the older versions of Laravel did not work this way, and this is a leftover.

The reason I believe I got this error, is that I hit a cached item that had been pushed to cache using an Illuminate\Contracts\Cache\Repository repository - the standard Laravel way - and pulled out using Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItemPool. The two store data in the underlying cache that is not compatible - the one stored by this package is serialized twice.

Is this intended? It means cache items can be stored and retreived by either the Laravel cache, or the madewithlove cache, but can never be passed between the two.

Massive memory leak

You cache forever rather than for a specific amount of time. This will fill the cache.

Potential issue

Just got the following in production:

Exception: DateInterval::__construct(): Unknown or bad format (PTS) in .../vendor/madewithlove/illuminate-psr-cache-bridge/src/Laravel/CacheItem.php:101
Stack trace:
#0 .../vendor/madewithlove/illuminate-psr-cache-bridge/src/Laravel/CacheItem.php(101): DateInterval->__construct('PTS')
#1 .../vendor/php-http/cache-plugin/src/CachePlugin.php(90): Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItem->expiresAfter(NULL)
#2 .../vendor/php-http/promise/src/FulfilledPromise.php(35): Http\Client\Common\Plugin\CachePlugin->Http\Client\Common\Plugin\{closure}(Object(GuzzleHttp\Psr7\Response))
#3 .../vendor/php-http/cache-plugin/src/CachePlugin.php(95): Http\Promise\FulfilledPromise->then(Object(Closure))
#4 .../vendor/php-http/client-common/src/PluginClient.php(155): Http\Client\Common\Plugin\CachePlugin-

I've not looked into this yet to determine if the other library is calling this one incorrectly, or if there's a bug here. Just giving you an early heads up.

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.