Authored by hugufei

场景化的列表和筛选项缓存单独拆出来

... ... @@ -120,7 +120,7 @@ public class SearchCacheFactory {
int cacheInMinute = 30;
return this.getOrCreateSearchCache("RECOMMEND_SHOP_AND_BRAND", cacheType, cacheInMinute);
}
/**
* 个性化聚合推荐相关的缓存-很耗性能[yoho_redis with 30min]
*
... ... @@ -133,7 +133,7 @@ public class SearchCacheFactory {
}
/**
* 找相似相关的缓存-很耗性能[yoho_redis with 15min]
* 找相似相关的缓存 TODO move
*
* @return
*/
... ... @@ -144,7 +144,7 @@ public class SearchCacheFactory {
}
/**
* 有好货的缓存
* 有好货的缓存 TODO move
*
* @return
*/
... ... @@ -153,7 +153,7 @@ public class SearchCacheFactory {
int cacheInMinute = 10;
return this.getOrCreateSearchCache("GOOD_PRODUCT", cacheType, cacheInMinute);
}
/**
* aop的缓存
*
... ... @@ -161,7 +161,29 @@ public class SearchCacheFactory {
*/
public SearchCache getAspectSearhCache(SearchCacheAble searchCacheAble) {
CacheType cacheType = CacheType.SEARCH_REDIS;
return this.getOrCreateSearchCache("AOP_"+searchCacheAble.cacheName(), cacheType, searchCacheAble.cacheInMinute());
return this.getOrCreateSearchCache("AOP_" + searchCacheAble.cacheName(), cacheType, searchCacheAble.cacheInMinute());
}
/**
* 场景化接口的缓存
*
* @return
*/
public SearchCache getSceneProductListSearchCache() {
CacheType cacheType = CacheType.SEARCH_REDIS;
int cacheInMinute = 10;
return this.getOrCreateSearchCache("SCENE_PRODUCT_LIST", cacheType, cacheInMinute);
}
/**
* 场景化筛选项的缓存
*
* @return
*/
public SearchCache getSceneAggregationsCache() {
CacheType cacheType = CacheType.SEARCH_REDIS;
int cacheInMinute = 30;
return this.getOrCreateSearchCache("SCENE_AAAREGATIONS", cacheType, cacheInMinute);
}
}
... ...
... ... @@ -41,7 +41,7 @@ public class SceneProductListService extends AbstractCacheAbleService {
@Override
public SearchCache getSearchCache() {
return searchCacheFactory.getProductListSearchCache();
return searchCacheFactory.getSceneProductListSearchCache();
}
/**
... ...
... ... @@ -46,7 +46,7 @@ public class SceneSelectionsService extends AbstractCacheAbleService {
@Override
public SearchCache getSearchCache() {
return searchCacheFactory.getSelectionsForAppCache();
return searchCacheFactory.getSceneAggregationsCache();
}
private ExecutorService executorService = Executors.newFixedThreadPool(100);
... ...