@ -67,6 +67,17 @@ public class RedisCache
return redisTemplate.expire(key, timeout, unit);
}
/**
* 获取剩余有效时间
*
* @param key Redis键
* @return 剩余时间
*/
public Long getExpire(final String key)
{
return redisTemplate.getExpire(key);
* 获得缓存的基本对象。
@ -39,4 +39,10 @@ public class RedisKeyConstants
* 监控物联服务器
public static final String MONITOR_IOT_SERVER = "monitor:iotServer:";
* 企业微信access_token
public static final String QYWX_ACCESS_TOKEN = "qywx:accessToken";