//cache 优雅写法
$notices = Cache::remember('key', 'expire_second', function () {
return Notice::query()
->where('state', '=', 1)
->orderByDesc('id')
->paginate();
});
//cache 优雅写法
$notices = Cache::remember('key', 'expire_second', function () {
return Notice::query()
->where('state', '=', 1)
->orderByDesc('id')
->paginate();
});