|
|
@@ -21,6 +21,7 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Slf4j
|
|
|
@@ -198,6 +199,7 @@ public class TabService {
|
|
|
if (CollectionUtils.isEmpty(videos) || videos.size() < size) {
|
|
|
String key = String.format(userInvalidTabCache, param.getUnionId());
|
|
|
redisTemplate.opsForSet().add(key, param.getTab().getKey());
|
|
|
+ redisTemplate.expire(key, 360 * 3600, TimeUnit.SECONDS);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("updateUserTabCache error", e);
|