goupan
2024-04-03 5506e9a45e717ffcb67ec313b5a4e8206d9b3a39
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package cn.stylefeng.roses.kernel.auth.cache;
 
import cn.hutool.cache.impl.TimedCache;
import cn.stylefeng.roses.kernel.auth.api.constants.LoginCacheConstants;
import cn.stylefeng.roses.kernel.cache.memory.AbstractMemoryCacheOperator;
 
/**
 * 记录用户登录失败次数的缓存
 * <p>
 * key是用户账号,value是登录失败错误次数
 *
 * @author fengshuonan
 * @date 2022/3/15 17:09
 */
public class LoginErrorCountMemoryCache extends AbstractMemoryCacheOperator<Integer> {
 
    public LoginErrorCountMemoryCache(TimedCache<String, Integer> timedCache) {
        super(timedCache);
    }
 
    @Override
    public String getCommonKeyPrefix() {
        return LoginCacheConstants.LOGIN_ERROR_CACHE_PREFIX;
    }
 
}