!44 【轻量级PR】图形验证码采用redis缓存 设置过期时间

Merge pull request !44 from 夜星/dev-7.3.3
pull/45/MERGE
stylefeng 2022-11-25 08:28:16 +00:00 committed by Gitee
commit 969b115bdd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ public class ImageCaptchaService implements ImageCaptchaApi {
SpecCaptcha specCaptcha = new SpecCaptcha(130, 48, 5);
String verCode = specCaptcha.text().toLowerCase();
String verKey = IdUtil.simpleUUID();
cacheOperatorApi.put(verKey, verCode);
cacheOperatorApi.put(verKey, verCode, 120L);
return ImageCaptcha.builder().verImage(specCaptcha.toBase64()).verKey(verKey).build();
}