feat():增加缓存代码示例
parent
2a3d68f51d
commit
ed3a542066
|
@ -235,7 +235,7 @@ public class RedisService {
|
|||
*
|
||||
* @return Hash对象集合
|
||||
*/
|
||||
public <T> List<T> getMultiCacheMapValue (final String key, final Collection<Object> hKeys) {
|
||||
public <T> List<T> getMultiCacheMapValue (final String key, final Collection<String> hKeys) {
|
||||
return redisTemplate.opsForHash().multiGet(key, hKeys);
|
||||
}
|
||||
|
||||
|
@ -262,6 +262,16 @@ public class RedisService {
|
|||
return redisTemplate.keys(pattern);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断redis中hashKey是否存在
|
||||
* @param key redis键
|
||||
* @param hashKey hash键
|
||||
*/
|
||||
public boolean hashKey(final String key, final String hashKey){
|
||||
return this.redisTemplate.opsForHash().hasKey(key, hashKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 减少序列值
|
||||
* @param key key
|
||||
|
|
Loading…
Reference in New Issue