Laravel offers a simple mechanism for caching database queries,

Example :

If we want to cache the user’s table for an hour we have to write this

$users = User::remember(60)->get();

that’s it now from this point to next 60 minutes query will not touch the database table User.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)