Browse Source

discipline cache key

deason 3 years ago
parent
commit
422d4ec3ee

+ 3 - 1
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamRecordQuestionsServiceImpl.java

@@ -19,6 +19,7 @@ import cn.com.qmth.examcloud.question.commons.core.paper.DefaultQuestionUnitWrap
 import cn.com.qmth.examcloud.question.commons.core.question.DefaultQuestion;
 import cn.com.qmth.examcloud.question.commons.core.question.DefaultQuestionStructure;
 import cn.com.qmth.examcloud.question.commons.core.question.DefaultQuestionUnit;
+import cn.com.qmth.examcloud.support.Constants;
 import cn.com.qmth.examcloud.support.cache.CacheHelper;
 import cn.com.qmth.examcloud.support.cache.bean.QuestionCacheBean;
 import cn.com.qmth.examcloud.support.examing.*;
@@ -233,7 +234,8 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
         long examRecordDataId = examSessionInfo.getExamRecordDataId();
 
         if (StringUtils.isEmpty(referer) || StringUtils.isEmpty(agent) || !agent.contains("electron-exam-shell")) {
-            redisClient.set("OE_SESSION_WARN_" + examSessionInfo.getExamRecordDataId(), true, 12 * 60 * 60);
+            String cacheKey = Constants.OE_DISCIPLINE_ILLEGAL_DATA + examSessionInfo.getExamRecordDataId();
+            redisClient.set(cacheKey, true, 6 * 60 * 60);
         }
 
         for (ExamStudentQuestionInfo examQuestionInfo : examQuestionInfos) {