Authored by hugufei

common的列表场景全部使用encache缓存

... ... @@ -160,7 +160,7 @@ public class SearchCacheFactory {
* @return
*/
public SearchCache getAspectSearhCache(SearchCacheAble searchCacheAble) {
CacheType cacheType = CacheType.SEARCH_REDIS;
CacheType cacheType = searchCacheAble.cacheType();
return this.getOrCreateSearchCache("AOP_" + searchCacheAble.cacheName(), cacheType, searchCacheAble.cacheInMinute());
}
... ...
... ... @@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.base.utils.ProductIndexEsField;
import com.yoho.search.common.cache.CacheType;
import com.yoho.search.common.cache.aop.SearchCacheAble;
import com.yoho.search.core.es.model.SearchParam;
import com.yoho.search.core.es.model.SearchResult;
... ... @@ -70,7 +71,7 @@ public class CommonSceneProductListService {
* @param paramMap
* @return
*/
@SearchCacheAble(cacheName = "SCENE_PRODUCT_LIST_DEFAULT", cacheInMinute = 10, excludeParams = { "uid" })
@SearchCacheAble(cacheName = "SCENE_PRODUCT_LIST_DEFAULT", cacheType=CacheType.EHCACHE, cacheInMinute = 10, excludeParams = { "uid" })
public SearchApiResult productListForDefault(Map<String, String> paramMap) {
try {
// 1)验证查询条数
... ...
... ... @@ -20,6 +20,7 @@ import org.springframework.stereotype.Component;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.base.utils.ProductIndexEsField;
import com.yoho.search.common.cache.CacheType;
import com.yoho.search.common.cache.aop.SearchCacheAble;
import com.yoho.search.core.es.model.SearchParam;
import com.yoho.search.core.es.model.SearchResult;
... ... @@ -49,7 +50,7 @@ public class CommonPageRecallService extends BaseRecallService {
* @param paramMap
* @return
*/
@SearchCacheAble(cacheInMinute = 10, cacheName = "COMMON_PAGE_RECALL_BATCH",returnClass = CommonRecallResult.class, excludeParams = { "uid", "order", "page" })
@SearchCacheAble(cacheInMinute = 10, cacheName = "COMMON_PAGE_RECALL_BATCH",cacheType=CacheType.EHCACHE,returnClass = CommonRecallResult.class, excludeParams = { "uid", "order", "page" })
public CommonRecallResult doCommonPageRecallBatch(Map<String, String> paramMap) {
try {
int viewNum = this.getViewNum(paramMap);
... ...