package cn.ksource.core.config;
|
|
import org.apache.commons.lang.StringUtils;
|
|
public class CacheKeyUtil {
|
|
/**
|
* 通用数据字典的缓存前缀
|
*/
|
public final static String CACHE_KEY_DATADICTIONARY_KEY = "dic_";
|
|
/**
|
* 子系统缓存前缀
|
*/
|
public final static String CACHE_KEY_Sub_System_KEY = "subsys_";
|
|
/**
|
* 区域数据字典缓存前缀
|
*/
|
public final static String CACHE_KEY_AREA_KEY = "area_";
|
/**
|
* 区域列表数据字典缓存前缀
|
*/
|
public final static String CACHE_KEY_AREA_List_KEY = "arealist_";
|
|
/**
|
* 接口数据字典缓存前缀
|
*/
|
public final static String CACHE_KEY_Interface_KEY = "interface_";
|
|
/**
|
* 消息数据字典缓存前缀
|
*/
|
public final static String CACHE_KEY_MessageQueue_KEY = "msg_";
|
|
|
public static String getDataDictionaryCacheKey(String key){
|
if (StringUtils.isBlank(key)) {
|
return null;
|
}
|
return CACHE_KEY_DATADICTIONARY_KEY + key;
|
}
|
|
|
public static String getSubSystemCacheKey(String key){
|
if (StringUtils.isBlank(key)) {
|
return null;
|
}
|
return CACHE_KEY_Sub_System_KEY + key;
|
}
|
|
public static String getAreaCacheKey(String key){
|
if (StringUtils.isBlank(key)) {
|
return null;
|
}
|
return CACHE_KEY_AREA_KEY + key;
|
}
|
|
public static String getAreaListCacheKey(String key){
|
if (StringUtils.isBlank(key)) {
|
return null;
|
}
|
return CACHE_KEY_AREA_List_KEY + key;
|
}
|
|
public static String getInterfaceCacheKey(String key){
|
if (StringUtils.isBlank(key)) {
|
return null;
|
}
|
return CACHE_KEY_Interface_KEY + key;
|
}
|
|
public static String getMessageQueueCacheKey(String key){
|
if (StringUtils.isBlank(key)) {
|
return null;
|
}
|
return CACHE_KEY_MessageQueue_KEY + key;
|
}
|
|
}
|