SearchCacheAble去除needMde注解
Showing
3 changed files
with
1 additions
and
12 deletions
@@ -26,12 +26,6 @@ public @interface SearchCacheAble { | @@ -26,12 +26,6 @@ public @interface SearchCacheAble { | ||
26 | public int cacheInMinute(); | 26 | public int cacheInMinute(); |
27 | 27 | ||
28 | /** | 28 | /** |
29 | - * 是否需要md5 | ||
30 | - * @return | ||
31 | - */ | ||
32 | - public boolean needMd5() default true; | ||
33 | - | ||
34 | - /** | ||
35 | * 缓存类型,默认search_redis | 29 | * 缓存类型,默认search_redis |
36 | * | 30 | * |
37 | * @return | 31 | * @return |
@@ -112,11 +112,7 @@ public class SearchCacheAspect { | @@ -112,11 +112,7 @@ public class SearchCacheAspect { | ||
112 | RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance(); | 112 | RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance(); |
113 | redisKeyBuilder.appendFixed("YOHOSEARCH:AOP:NEW:"); | 113 | redisKeyBuilder.appendFixed("YOHOSEARCH:AOP:NEW:"); |
114 | redisKeyBuilder.appendFixed(searchCacheAble.cacheName()).appendFixed(":"); | 114 | redisKeyBuilder.appendFixed(searchCacheAble.cacheName()).appendFixed(":"); |
115 | - if (searchCacheAble.needMd5()) { | ||
116 | redisKeyBuilder.appendVar(MD5Util.string2MD5(paramKey)); | 115 | redisKeyBuilder.appendVar(MD5Util.string2MD5(paramKey)); |
117 | - } else { | ||
118 | - redisKeyBuilder.appendVar(paramKey); | ||
119 | - } | ||
120 | return redisKeyBuilder; | 116 | return redisKeyBuilder; |
121 | } | 117 | } |
122 | } | 118 | } |
@@ -104,8 +104,7 @@ public class SearchCacheService { | @@ -104,8 +104,7 @@ public class SearchCacheService { | ||
104 | return cacheObject.toJSONObject(); | 104 | return cacheObject.toJSONObject(); |
105 | } | 105 | } |
106 | 106 | ||
107 | - /*********************************** SearchApiResult *****************************************/ | ||
108 | - @SuppressWarnings("unchecked") | 107 | + /*********************************** object *****************************************/ |
109 | public <T> T getSerializableObjectFromCache(SearchCache searchCache, RedisKeyBuilder redisKeyBuilder, Type type, boolean useJsonSerializable) { | 108 | public <T> T getSerializableObjectFromCache(SearchCache searchCache, RedisKeyBuilder redisKeyBuilder, Type type, boolean useJsonSerializable) { |
110 | try { | 109 | try { |
111 | CacheObject cacheObject = this.getCacheObjectFromCache(redisKeyBuilder, searchCache); | 110 | CacheObject cacheObject = this.getCacheObjectFromCache(redisKeyBuilder, searchCache); |
-
Please register or login to post a comment