mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-10 06:09:12 +00:00
优化获取缓存信息方式
This commit is contained in:
@@ -74,6 +74,17 @@ public class RedisService
|
||||
return redisTemplate.expire(key, timeout, unit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取有效时间
|
||||
*
|
||||
* @param key Redis键
|
||||
* @return 有效时间
|
||||
*/
|
||||
public long getExpire(final String key)
|
||||
{
|
||||
return redisTemplate.getExpire(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断 key是否存在
|
||||
*
|
||||
|
Reference in New Issue
Block a user