How to use redis in online examination system?

thinkphp+mysql+redis, is used in the background to arrange on-site exams every period of time, about 100 people. At ordinary times, 3000 people will take mock exam training.

my idea: formal examination, give out 100 sets of papers, except that there are 100 sets of papers in the database, put the same 100 sets of papers in redis. In this way, candidates load the test papers in redis directly, do not have a relationship with the database, and send the Synchronize test results to the database, while emptying the redis.

is this consideration necessary?

Jan.31,2022

if you use Synchronize data every time you do a question or Synchronize data every time you change it (see codeshelper , which is automatically saved when writing answers), there is no problem, and it can reduce the pressure on the database.
what to consider is that redis is at risk of losing data. What if redis fails or restarts during the exam

?
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be8378-318ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be8378-318ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?