Authored by zhengwen.ge

修改缓存时间

... ... @@ -183,7 +183,7 @@ public class DDServiceImpl implements MainUnionService {
UnionType unionType = redisValueCache.get("yh:union:uniontype:1",UnionType.class);
if(unionType==null){
unionType = unionTypeDAO.selectByUnionType(1);
redisValueCache.set("yh:union:uniontype:1",unionType,24, TimeUnit.HOURS);
redisValueCache.set("yh:union:uniontype:1",unionType,1, TimeUnit.HOURS);
}
UnionTypeModel type = new UnionTypeModel();
type.setName(unionType.getName());
... ...
... ... @@ -139,7 +139,7 @@ public class GDTServiceImpl implements MainUnionService {
UnionType unionType = redisValueCache.get("yh:union:uniontype:3",UnionType.class);
if(unionType==null){
unionType = unionTypeDAO.selectByUnionType(3);
redisValueCache.set("yh:union:uniontype:1",unionType,24, TimeUnit.HOURS);
redisValueCache.set("yh:union:uniontype:1",unionType,1, TimeUnit.HOURS);
}
UnionTypeModel u = new UnionTypeModel();
u.setName(unionType.getName());
... ...
... ... @@ -107,7 +107,7 @@ public class UnionServiceImpl implements IUnionService {
UnionType type = redisValueCache.get("yh:union:uniontype:"+request.getUnion_type(),UnionType.class);
if(type==null){
type = unionTypeDAO.selectByUnionType(Integer.valueOf(request.getUnion_type()));
redisValueCache.set("yh:union:uniontype:"+request.getUnion_type(),type,24, TimeUnit.HOURS);
redisValueCache.set("yh:union:uniontype:"+request.getUnion_type(),type,1, TimeUnit.HOURS);
}
if (type == null) {
log.warn("clickUnion error because union_type is error with param is {}", request);
... ... @@ -305,7 +305,7 @@ public class UnionServiceImpl implements IUnionService {
UnionType unionType = redisValueCache.get(unionTypekey,UnionType.class);
if(unionType==null){
unionType = unionTypeDAO.selectByUnionType(Integer.parseInt(click.getUnion_type()));
redisValueCache.set(unionTypekey,unionType,24, TimeUnit.HOURS);
redisValueCache.set(unionTypekey,unionType,1, TimeUnit.HOURS);
}
UnionTypeModel u = new UnionTypeModel();
u.setName(unionType.getName());
... ...