//从redis中获取疾病列表
Object redisdiseases = redisTemplate.opsForValue().get("diseases"); if(redisdiseases!=null){ logger.info("调用redis中疾病的列表"); return R.success(redisdiseases); }
//如果redis为空
//设置超时时间
redisTemplate.opsForValue().set("diseases",diseases,6000, TimeUnit.SECONDS);
>