package cn.besteam.common.constant;
|
|
/**
|
* @author chenqilong
|
* @since 2020-03-30
|
*/
|
public class CacheKey {
|
|
/**
|
* 8小时过期
|
*/
|
public static final int USER_SESSION_TIMEOUT = 60 * 60 * 12;
|
|
/**
|
* 15天过期
|
*/
|
public static final int USER_APP_SESSION_TIMEOUT = 60 * 60 * 24 * 15;
|
|
/**
|
* 5分钟
|
*/
|
public static final int SMS_VALIDATE_CODE_TIMEOUT = 60 * 5;
|
|
/**
|
* 55秒
|
*/
|
public static final int SMS_VALIDATE_CODE_PERIOD_TIMEOUT = 55;
|
|
public static String getUserCacheKey(String token) {
|
|
return "user:" + token;
|
}
|
|
public static String getForgotValidateCodeKey(String account) {
|
|
return "sms:forgot:" + account;
|
}
|
|
public static String getValidateCodePeriodKey(String account) {
|
|
return "sms:forgot:period:" + account;
|
}
|
|
public static String getGlobalDeviceValidateStatusKey() {
|
|
return "medical:global:device:validate:status";
|
}
|
|
public static String getWrongPasswordCount() {
|
|
return "medical:global:password:wrong:count";
|
}
|
|
}
|