fix(roll_call): 清除缓存以确保下次抽取读取最新记录
#164
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
之所以提交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:
reset_drawn_records, after resetting the record, the method now deletes the corresponding entry fromRollCallUtils._drawn_record_cacheto ensure fresh data is used for future draws.record_drawn_students, after recording selected students, the method also deletes the relevant cache entry to maintain consistency with the latest drawn records.