Authored by hugufei

SearchCacheAble去除needMde注解

... ... @@ -26,12 +26,6 @@ public @interface SearchCacheAble {
public int cacheInMinute();
/**
* 是否需要md5
* @return
*/
public boolean needMd5() default true;
/**
* 缓存类型,默认search_redis
*
* @return
... ...
... ... @@ -112,11 +112,7 @@ public class SearchCacheAspect {
RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance();
redisKeyBuilder.appendFixed("YOHOSEARCH:AOP:NEW:");
redisKeyBuilder.appendFixed(searchCacheAble.cacheName()).appendFixed(":");
if (searchCacheAble.needMd5()) {
redisKeyBuilder.appendVar(MD5Util.string2MD5(paramKey));
} else {
redisKeyBuilder.appendVar(paramKey);
}
return redisKeyBuilder;
}
}
... ...
... ... @@ -104,8 +104,7 @@ public class SearchCacheService {
return cacheObject.toJSONObject();
}
/*********************************** SearchApiResult *****************************************/
@SuppressWarnings("unchecked")
/*********************************** object *****************************************/
public <T> T getSerializableObjectFromCache(SearchCache searchCache, RedisKeyBuilder redisKeyBuilder, Type type, boolean useJsonSerializable) {
try {
CacheObject cacheObject = this.getCacheObjectFromCache(redisKeyBuilder, searchCache);
... ...