How to cache query result in slim?



I want to cache frequently used queries and send them back without calling database.
I am using eloquent with slim framework.

Please guide me how to do it



I haven’t tested it myself yet, but maybe that could be a solution:

Rememberable, Laravel 5 query cache

Edit / Note: Rememberable interfaces directly with Laravel and depends on the app() function provided by it. The developer has no plans to support use outside of Laravel.


Can i implement memcached in slimframework? Please give me some guide for this.


Can i implement memcached in slimframework?

Yes. You just need the memcached PHP extension:

Just add a new entry to your container:

$container['memcached'] = function (Container $container) {
    $mc = new Memcached(); 
    $mc->addServer("", 11211);
    return $mc;


$mc = $container->get('memcached');
$mc->set("foo", "Hello!"); 
$mc->set("bar", "Memcached...");


@mahesh have you found a solution,.?