cache StatusTransform and invalidate on like, comment and share
This commit is contained in:
parent
1fda4c8386
commit
a891bbcc9a
4 changed files with 36 additions and 26 deletions
|
@ -218,6 +218,8 @@ class StatusController extends Controller
|
|||
$profile = Auth::user()->profile;
|
||||
$status = Status::withCount('shares')->findOrFail($request->input('item'));
|
||||
|
||||
Cache::forget('transform:status:'.$status->url());
|
||||
|
||||
$count = $status->shares_count;
|
||||
|
||||
$exists = Status::whereProfileId(Auth::user()->profile->id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue