Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
f72efb80
Commit
f72efb80
authored
Jul 04, 2023
by
Zheng Jie
Browse files
RedisUtils key过期时间增加提示
close
https://github.com/elunez/eladmin/issues/763
parent
4f31a0ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java
View file @
f72efb80
...
...
@@ -51,7 +51,7 @@ public class RedisUtils {
* 指定缓存失效时间
*
* @param key 键
* @param time 时间(秒)
* @param time 时间(秒)
注意:这里将会替换原有的时间
*/
public
boolean
expire
(
String
key
,
long
time
)
{
try
{
...
...
@@ -69,7 +69,7 @@ public class RedisUtils {
* 指定缓存失效时间
*
* @param key 键
* @param time 时间(秒)
* @param time 时间(秒)
注意:这里将会替换原有的时间
* @param timeUnit 单位
*/
public
boolean
expire
(
String
key
,
long
time
,
TimeUnit
timeUnit
)
{
...
...
@@ -244,7 +244,7 @@ public class RedisUtils {
*
* @param key 键
* @param value 值
* @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
* @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
,注意:这里将会替换原有的时间
* @return true成功 false 失败
*/
public
boolean
set
(
String
key
,
Object
value
,
long
time
)
{
...
...
@@ -266,7 +266,7 @@ public class RedisUtils {
*
* @param key 键
* @param value 值
* @param time 时间
* @param time 时间
,注意:这里将会替换原有的时间
* @param timeUnit 类型
* @return true成功 false 失败
*/
...
...
@@ -326,11 +326,11 @@ public class RedisUtils {
}
/**
* HashSet
并设置时间
* HashSet
*
* @param key 键
* @param map 对应多个键值
* @param time 时间(秒)
* @param time 时间(秒)
注意:如果已存在的hash表有时间,这里将会替换原有的时间
* @return true成功 false失败
*/
public
boolean
hmset
(
String
key
,
Map
<
String
,
Object
>
map
,
long
time
)
{
...
...
@@ -484,7 +484,7 @@ public class RedisUtils {
* 将set数据放入缓存
*
* @param key 键
* @param time 时间(秒)
* @param time 时间(秒)
注意:这里将会替换原有的时间
* @param values 值 可以是多个
* @return 成功个数
*/
...
...
@@ -605,7 +605,7 @@ public class RedisUtils {
*
* @param key 键
* @param value 值
* @param time 时间(秒)
* @param time 时间(秒)
注意:这里将会替换原有的时间
* @return
*/
public
boolean
lSet
(
String
key
,
Object
value
,
long
time
)
{
...
...
@@ -643,7 +643,7 @@ public class RedisUtils {
*
* @param key 键
* @param value 值
* @param time 时间(秒)
* @param time 时间(秒)
注意:这里将会替换原有的时间
* @return
*/
public
boolean
lSet
(
String
key
,
List
<
Object
>
value
,
long
time
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment