List of usage examples for org.springframework.data.redis.connection RedisConnection pExpire
@Nullable Boolean pExpire(byte[] key, long millis);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Set time to live for given {@code key} in milliseconds. * <p>/*from w w w .ja va2 s . c o m*/ * See http://redis.io/commands/pexpire * * @param key key * @param millis millis * @return Boolean */ public static Boolean pExpire(byte[] key, long millis) { return redisTemplate.execute(new RedisCallback<Boolean>() { @Override public Boolean doInRedis(RedisConnection redis) throws DataAccessException { return redis.pExpire(key, millis); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Set time to live for given {@code key} in milliseconds. * <p>//from w w w . j a v a 2 s.c o m * See http://redis.io/commands/pexpire * * @param key key * @param millis millis * @return Boolean */ public Boolean pExpire(byte[] key, long millis) { return redisTemplate.execute(new RedisCallback<Boolean>() { @Override public Boolean doInRedis(RedisConnection redis) throws DataAccessException { return redis.pExpire(key, millis); } }); }