老师,如果设置了过期时间,那么过期时间的单位是多少呢
来源:2-7 集成redis下

帅的有丢酷
2020-06-20
这里我设置的是5000,是代表5000秒吗?
/**
* 永不过期的
*/
public static UserKey getById = new UserKey(“id”);
public static UserKey getByName = new UserKey(“name”);
/**
* 过期时间
*/
public static UserKey getByIdWithTime = new UserKey(5000,"id");
public static UserKey getByNameWitTime = new UserKey(5000,"name");
写回答
1回答
-
若鱼1919
2020-06-20
是的,ttl是用秒来计算的,课程的代码中也是设置的秒,要不为啥叫expireSeconds?
00
相似问题