return Cache::remember('districts.all',60*60, function (){
return District::all();
});
缓存集合是
[
{
"id": 1,
"title": "Dhaka"
},
{
"id": 2,
"title": "Rajshahi"
},
{
"id": 3,
"title": "Barishal"
}
]
现在如何在 Districts.all 缓存中添加新内容
"id":4 ,
"title":"New District"
以及如何更新此缓存
"id":3,
"title":"Khulna"