类 CaptchaCacheServiceMemImpl
java.lang.Object
com.xingyuv.captcha.service.impl.CaptchaCacheServiceMemImpl
- 所有已实现的接口:
CaptchaCacheService
已过时。
: 默认使用内存当缓存
对于分布式部署的应用,我们建议应用自己实现CaptchaCacheService,比如用Redis,参考service/spring-boot代码示例。
如果应用是单点的,也没有使用redis,那默认使用内存。
内存缓存只适合单节点部署的应用,否则验证码生产与验证在节点之间信息不同步,导致失败。
- 作者:
- lide1202@hotmail.com
-
构造器概要
构造器 -
方法概要
-
构造器详细资料
-
CaptchaCacheServiceMemImpl
public CaptchaCacheServiceMemImpl()已过时。
-
-
方法详细资料
-
set
已过时。- 指定者:
set在接口中CaptchaCacheService
-
exists
已过时。- 指定者:
exists在接口中CaptchaCacheService
-
delete
已过时。- 指定者:
delete在接口中CaptchaCacheService
-
get
已过时。- 指定者:
get在接口中CaptchaCacheService
-
increment
已过时。- 指定者:
increment在接口中CaptchaCacheService- 参数:
key- keyval- val- 返回:
- increment
-
type
已过时。从接口复制的说明:CaptchaCacheService缓存类型-local/redis/memcache/.. 通过java SPI机制,接入方可自定义实现类- 指定者:
type在接口中CaptchaCacheService- 返回:
- type
-