sakshamhappy's avatar

How to work Cache system in laravel?

i want to implement Cache system in laravel and using reminder method but still not working, when my database update, delete and create, or if i implement pagination then not working,when i try to change page then i found previous record.

#laravel version : 5.5.34

#cache driver : database

public function index() { $value = Cache::remember('users', now()->addSeconds(60), function () { return User::paginate(); }); // $value = User::paginate();

    return view('user_list',compact('value'));
}

i am showing some code for example

0 likes
1 reply
crnkovic's avatar
  • Read through the documentation: https://laravel.com/docs/5.6/cache
  • Which Laravel version?
  • Which Cache driver?
  • Show us some code samples
  • Explain a bit more, your explanation is not enough for general user to understand your issue ("not working" is not enough for us to help you)

Please or to participate in this conversation.