Selaa lähdekoodia

fix cache keys timeout.

deason 2 vuotta sitten
vanhempi
commit
e0876abf9a

+ 2 - 2
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/cache/ExamStudentCache.java

@@ -44,8 +44,8 @@ public class ExamStudentCache extends RandomObjectRedisCache<ExamStudentCacheBea
 
 
     @Override
     @Override
     protected int getTimeout() {
     protected int getTimeout() {
-        // 10
-        return 60 * 60 * 24 * 10;
+        // 1天
+        return 60 * 60 * 24;
     }
     }
 
 
 }
 }

+ 2 - 1
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordDataCacheServiceImpl.java

@@ -1,5 +1,6 @@
 package cn.com.qmth.examcloud.core.oe.admin.service.impl;
 package cn.com.qmth.examcloud.core.oe.admin.service.impl;
 
 
+import cn.com.qmth.examcloud.core.oe.admin.base.Constants;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordDataCacheService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordDataCacheService;
 import cn.com.qmth.examcloud.support.examing.ExamRecordData;
 import cn.com.qmth.examcloud.support.examing.ExamRecordData;
 import cn.com.qmth.examcloud.support.redis.RedisKeyHelper;
 import cn.com.qmth.examcloud.support.redis.RedisKeyHelper;
@@ -23,7 +24,7 @@ public class ExamRecordDataCacheServiceImpl implements ExamRecordDataCacheServic
     @Override
     @Override
     public void saveExamRecordDataCache(Long examRecordDataId, ExamRecordData data) {
     public void saveExamRecordDataCache(Long examRecordDataId, ExamRecordData data) {
         String key = RedisKeyHelper.getBuilder().examRecordDataKey(examRecordDataId);
         String key = RedisKeyHelper.getBuilder().examRecordDataKey(examRecordDataId);
-        redisClient.set(key, data, -1);
+        redisClient.set(key, data, Constants.TIME_OUT_7_DAY);
     }
     }
 
 
     @Override
     @Override