浏览代码

Update StatusService, invalidate profile embed cache on deletion

Daniel Supernault 4 年之前
父节点
当前提交
acaf630dee
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      app/Services/StatusService.php

+ 4 - 0
app/Services/StatusService.php

@@ -41,6 +41,10 @@ class StatusService {
 
 
 	public static function del($id)
 	public static function del($id)
 	{
 	{
+		$status = self::get($id);
+		if($status && isset($status['account']) && isset($status['account']['id'])) {
+			Cache::forget('profile:embed:' . $status['account']['id']);
+		}
 		Cache::forget('status:thumb:nsfw0' . $id);
 		Cache::forget('status:thumb:nsfw0' . $id);
 		Cache::forget('status:thumb:nsfw1' . $id);
 		Cache::forget('status:thumb:nsfw1' . $id);
 		Cache::forget('pf:services:sh:id:' . $id);
 		Cache::forget('pf:services:sh:id:' . $id);