Skip to content

Conversation

@WSXYT
Copy link
Collaborator

@WSXYT WSXYT commented Jan 15, 2026

之所以提交pr是因为你说不负责的地方不能随便改(顺手修bug):((((((
This pull request improves the reliability of student selection in the roll call utility by ensuring that the internal cache of drawn records is cleared whenever records are reset or updated. This guarantees that subsequent draws always use the most up-to-date data.

Cache management improvements:

  • In reset_drawn_records, after resetting the record, the method now deletes the corresponding entry from RollCallUtils._drawn_record_cache to ensure fresh data is used for future draws.
  • In record_drawn_students, after recording selected students, the method also deletes the relevant cache entry to maintain consistency with the latest drawn records.

Copilot AI review requested due to automatic review settings January 15, 2026 17:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses a cache invalidation bug in the roll call utility by ensuring that the internal cache of drawn records is properly cleared when records are reset or updated. This prevents the system from using stale cached data after record modifications.

Changes:

  • Added cache invalidation in reset_drawn_records to clear cached drawn records after reset operations
  • Added cache invalidation in record_drawn_students to clear cached drawn records after recording new draws

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@WSXYT
Copy link
Collaborator Author

WSXYT commented Jan 15, 2026

(其实是因为太困了脑子不太清醒(也许不用提交(算了真得睡了(要不然完蛋了(qwq

@lzy98276 lzy98276 closed this Jan 15, 2026
@lzy98276
Copy link
Member

因为该PR不符合我的开发计划,以及优化代码时会包括这个部分,所以将关闭此PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants