清理缓存
This commit is contained in:
parent
26eb9050b8
commit
b2e7e29889
@ -183,6 +183,8 @@ protected static function boot()
|
|||||||
// when Updated
|
// when Updated
|
||||||
static::updated(function ($model) {
|
static::updated(function ($model) {
|
||||||
dispatch(new \App\Jobs\Remote\Host($model, 'patch'));
|
dispatch(new \App\Jobs\Remote\Host($model, 'patch'));
|
||||||
|
|
||||||
|
Cache::forget('user_hosts_' . $model->user_id);
|
||||||
});
|
});
|
||||||
|
|
||||||
// // when delete
|
// // when delete
|
||||||
@ -191,5 +193,9 @@ protected static function boot()
|
|||||||
|
|
||||||
// // dispatch(new \App\Jobs\Remote\Host($model, 'delete'));
|
// // dispatch(new \App\Jobs\Remote\Host($model, 'delete'));
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
static::deleted(function ($model) {
|
||||||
|
Cache::forget('user_hosts_' . $model->user_id);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user