List of usage examples for org.springframework.data.redis.support.collections RedisSet expire
@Nullable
Boolean expire(long timeout, TimeUnit unit);
From source file:com.afousan.service.RetwisRepository.java
public List<String> commonFollowers(String uid, String targetUid) { RedisSet<String> tempSet = following(uid).intersectAndStore(following(targetUid), KeyUtils.commonFollowers(uid, targetUid)); tempSet.expire(5, TimeUnit.SECONDS); return covertUidsToNames(tempSet.getKey()); }