文章模块下的Redis Key 应该遵循设计规范,因此创建类: StrategyRedisKeyPrefix,继承 BaseKeyPrefix
在模块trip-article-api
中创建包:com.swx.article.redis.key
,在该包下创建类:StrategyRedisKeyPrefix
UserRedisKeyPrefixpublic class StrategyRedisKeyPrefix extends BaseKeyPrefix {
public static final StrategyRedisKeyPrefix STRATEGIES_STAT_DATA_MAP = new StrategyRedisKeyPrefix("STRATEGIES:STAT:DATA"); public static final StrategyRedisKeyPrefix STRATEGIES_STAT_COUNT_RANK_ZSET = new StrategyRedisKeyPrefix("STRATEGIES:STAT:COUNT:RANK"); public static final StrategyRedisKeyPrefix STRATEGIES_TOP_MAP = new StrategyRedisKeyPrefix("STRATEGIES:TOP");
public StrategyRedisKeyPrefix(String prefix) { super(prefix); }
public StrategyRedisKeyPrefix(String prefix, Long timeout, TimeUnit unit) { super(prefix, timeout, unit); } }
|