Coder Social home page Coder Social logo

silex-cache-service-provider's People

Contributors

adam187 avatar benscholler avatar declic3000 avatar kevinboudot avatar kisscool-fr avatar moust 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

Watchers

 avatar  avatar  avatar  avatar  avatar

silex-cache-service-provider's Issues

Config error ?

Hi,

I followed the doc, so here is my bootstrap :

$app['cache.options'] = array(
    'driver' => 'redis',
    'redis' => function() {
        $redis = new \Redis();
        $redis->connect('myserver', 6379);
        return $redis;
    }
);

Doesn't work...

And when I launch my debugger, at this line in RedisCache.php

if (!isset($options['redis']) || !$options['redis'] instanceof Redis) {
    //default connection
}

The debugger goes inside the loop ... And it shouldn't go inside
Because the closure never called.

I think the code should be something like :

if (!isset($options['redis']) || !is_callable($options['redis']) || !$options['redis']() instanceof Redis) {
   //default connection
}

Same code for the other providers but i didn't try them.
What do you think ?

FileCache exists function always returns that cache does not exists.

In FileCache class, the exists function always returns false.

The fetch function, expects the cache key, but in the exists function, the filename is passed to the fetch function.

So

public function exists($key)
{
    return !!$this->fetch($this->getFileName($key));
}

Should be changed to:

public function exists($key)
{
    return !!$this->fetch($key);
}

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.