Browse Source

fix: 修复标记错题后列表没有立即刷新的问题

大侠咬超人 6 days ago
parent
commit
9161f5a29c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/Services/MistakeBookService.php

+ 3 - 0
app/Services/MistakeBookService.php

@@ -405,6 +405,9 @@ class MistakeBookService
             // ⚠️ 重要:重新加载模型数据以获取最新状态
             $mistake->refresh();
 
+            // 【修复】清除缓存,避免列表延迟显示更新
+            $this->clearCache($mistake->student_id);
+
             return [
                 'success' => true,
                 'mistake_id' => $mistakeId,