ip 地址缓存增加过期时间
This commit is contained in:
parent
2ce1d30f06
commit
78280b54ef
|
|
@ -125,7 +125,7 @@ public class OperationLogAspect {
|
|||
log.set("location", Convert.toStr(location));
|
||||
} else {
|
||||
String address = AddressUtil.getRealAddressByIp(ip);
|
||||
redisService.set("IP::" + ip, address);
|
||||
redisService.set("IP::" + ip, address, 60 * 60 * 24);
|
||||
log.set("location", address);
|
||||
}
|
||||
log.set("userAgent", request.getHeader(HttpHeaders.USER_AGENT));
|
||||
|
|
@ -151,4 +151,4 @@ public class OperationLogAspect {
|
|||
//保存到Redis队列里
|
||||
logProducer.saveLog(JSON.toJSONString(log.toUnderlineKeysMap(), JSONWriter.Feature.WriteMapNullValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue