1.5.0重构;

修复一大堆已知问题,
优化代码,
增加 application 类,
重构拦截器组件,
添加缓存模块,
This commit is contained in:
天爱有情
2024-07-12 14:54:25 +08:00
parent db2f409783
commit 2cfb72349d
42 changed files with 2311 additions and 192 deletions
@@ -0,0 +1,60 @@
package cloud.tianai.captcha.cache;
import cloud.tianai.captcha.common.AnyMap;
import java.util.concurrent.TimeUnit;
/**
* @Author: 天爱有情
* @date 2022/3/2 14:35
* @Description 提取出用于缓存的接口
*/
public interface CacheStore {
/**
* 读取缓存数据通过key
*
* @param key key
* @return AnyMap
*/
AnyMap getCache(String key);
/**
* 获取并删除数据 通过key
*
* @param key key
* @return AnyMap
*/
AnyMap getAndRemoveCache(String key);
/**
* 添加缓存数据
*
* @param key key
* @param data data
* @param expire 过期时间
* @param timeUnit 过期时间单位
* @return boolean
*/
boolean setCache(String key, AnyMap data, Long expire, TimeUnit timeUnit);
/**
* incr 数字
*
* @param key key
* @param delta 境量
* @param expire 过期时间
* @param timeUnit 过期时间单位
* @return Long
*/
Long incr(String key, long delta, Long expire, TimeUnit timeUnit);
/**
* get 数字
*
* @param key key
* @return Long
*/
Long getLong(String key);
}