jeudi 30 novembre 2017

How to implement query caching in laravel

I am trying to implement caching in my php/laravel application. I am using the repository pattern along with laravel. Now laravel provides inbuilt cache support something like

$value = Cache::rememberForever('users', function() {
    return DB::table('users')->get();
});

But i wanted to implement a general cache system so that even if i change my database this should work. Any help is appreciated.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kbyVgY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire