【7.3.2】【security】更新计数缓存配置

pull/41/head
fengshuonan 2022-11-08 21:36:01 +08:00
parent 9104753124
commit 2d4b3ff8ac
3 changed files with 57 additions and 2 deletions

View File

@ -32,6 +32,13 @@
<groupId>cn.stylefeng.roses</groupId>
<artifactId>cache-sdk-memory</artifactId>
<version>${roses.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.stylefeng.roses</groupId>
<artifactId>cache-sdk-redis</artifactId>
<version>${roses.version}</version>
<optional>true</optional>
</dependency>
<!--web模块-->

View File

@ -35,9 +35,9 @@ import cn.stylefeng.roses.kernel.security.api.constants.CounterConstants;
* @author fengshuonan
* @date 2020/11/15 15:26
*/
public class DefaultCountValidateCache extends AbstractMemoryCacheOperator<Long> {
public class CountValidateMemoryCache extends AbstractMemoryCacheOperator<Long> {
public DefaultCountValidateCache(TimedCache<String, Long> timedCache) {
public CountValidateMemoryCache(TimedCache<String, Long> timedCache) {
super(timedCache);
}

View File

@ -0,0 +1,48 @@
/*
* Copyright [2020-2030] [https://www.stylefeng.cn]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GunsAPACHE LICENSE 2.0使
*
* 1.LICENSE
* 2.Guns
* 3.
* 4. https://gitee.com/stylefeng/guns
* 5. https://gitee.com/stylefeng/guns
* 6.
*/
package cn.stylefeng.roses.kernel.security.count.cache;
import cn.stylefeng.roses.kernel.cache.redis.AbstractRedisCacheOperator;
import cn.stylefeng.roses.kernel.security.api.constants.CounterConstants;
import org.springframework.data.redis.core.RedisTemplate;
/**
*
*
* @author chenjinlong
* @date 2021/1/15 13:44
*/
public class CountValidateRedisCache extends AbstractRedisCacheOperator<Long> {
public CountValidateRedisCache(RedisTemplate<String, Long> redisTemplate) {
super(redisTemplate);
}
@Override
public String getCommonKeyPrefix() {
return CounterConstants.COUNT_VALIDATE_CACHE_KEY_PREFIX;
}
}