可以像这样缓存查询结果:
$users = DB::table('users')->remember(10)->get();
但是如何缓存列表结果。这不起作用:
$roles = DB::table('roles')->lists('title'); // Works, but not cached.
$roles = DB::table('roles')->remember(10)->lists('title'); // Not working.
抛出的错误:
exception 'BadMethodCallException' with message 'Call to undefined method Illuminate\Database\Query\Builder::remember()'