Authored by hugufei

PC普通的列表和筛选项缓存时间改为5分钟

... ... @@ -5,9 +5,9 @@ public enum CacheInMinute {
Minute_1(1),
Minute_UFO(3),
Minute_5(5),
Minute_30(30),
Minute_Common(10),
Minute_ProductList(10),
Minute_30(30),
Minute_Persional(30),
Minute_SearchLike(60);
... ...
... ... @@ -31,6 +31,8 @@ public class CacheTimeConstants {
//页面个性化因子的缓存
public static final int PAGE_PERSIONAL_FACTOR = 10;
public static final int CACHE_COMMON_MINUTE = 5;
public static final int CACHE_COMMON_MINUTE = 10;
public static final int CACHE_WEB_MINUTE = 5;
}
... ...
... ... @@ -15,7 +15,7 @@ import com.yoho.search.common.utils.HttpServletRequestUtils;
import com.yoho.search.models.SearchApiResult;
import com.yoho.search.service.scene.general.DiscountService;
import com.yoho.search.service.scene.general.ProductCountService;
import com.yoho.search.service.scene.web.RecentService;
import com.yoho.search.service.scene.general.RecentService;
import com.yoho.search.service.scene.general.SearchService;
import com.yoho.search.service.scene.general.SortGroupService;
... ...
package com.yoho.search.service.scene.web;
package com.yoho.search.service.scene.general;
import com.alibaba.fastjson.JSONObject;
import com.yoho.error.event.SearchEvent;
import com.yoho.search.aop.cache.SearchCacheAble;
import com.yoho.search.base.utils.EventReportEnum;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.cache.CacheTimeConstants;
import com.yoho.search.common.SearchCommonService;
import com.yoho.search.common.utils.SearchApiResultUtils;
import com.yoho.search.core.es.agg.IAggregation;
... ...
... ... @@ -73,7 +73,7 @@ public class PageAggregationHelper {
* @param paramMap
* @return
*/
@SearchCacheAble(cacheName = "SCENE_AGG_CUSTOMIZETAG", cacheInMinute = CacheInMinute.Minute_5, excludeParams = {"uid", "udid", "order", "page", "viewNum", "yh_channel"})
@SearchCacheAble(cacheName = "SCENE_AGG_CUSTOMIZETAG",cacheInMinute = CacheInMinute.Minute_5,excludeParams = {"uid", "udid", "order", "page", "viewNum", "yh_channel"})
public JSONObject sceneAggCustomizeTag(Map<String, String> paramMap) {
try {
IAggregation customizeAggregation = aggregationFactory.getCustomizeTagAggregation(paramMap);
... ...
... ... @@ -55,7 +55,7 @@ public class SuggestService implements ApplicationEventPublisherAware {
this.publisher = applicationEventPublisher;
}
@SearchCacheAble(cacheName = "SUGGEST",cacheInMinute =CacheInMinute.Minute_Common, includeParams = {"query", "app_type", "contain_global", "is_encode"})
@SearchCacheAble(cacheName = "SUGGEST",includeParams = {"query", "app_type", "contain_global", "is_encode"})
public SuggestApiResult suggest(Map<String, String> paramMap) {
try {
logger.info("[func=suggest][param={}][begin={}]", paramMap.toString(), System.currentTimeMillis());
... ...
... ... @@ -91,7 +91,7 @@ public class SelectionsForPcService extends AbstractCacheComponent<JSONObject> {
@Override
protected int cacheTimeInMinute() {
return CacheTimeConstants.CACHE_COMMON_MINUTE;
return CacheTimeConstants.CACHE_WEB_MINUTE;
}
@Override
... ...
... ... @@ -7,8 +7,6 @@ import com.yoho.search.base.utils.EventReportEnum;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.base.utils.ProductIndexEsField;
import com.yoho.search.cache.CacheInMinute;
import com.yoho.search.cache.CacheTimeConstants;
import com.yoho.search.cache.CacheType;
import com.yoho.search.common.SearchCommonService;
import com.yoho.search.common.SearchRequestParams;
import com.yoho.search.common.utils.SearchApiResultUtils;
... ... @@ -67,7 +65,7 @@ public class WebNewShelveService implements ApplicationEventPublisherAware {
this.publisher = applicationEventPublisher;
}
@SearchCacheAble(cacheName = "WEB_NEW_SHELVE", cacheInMinute = CacheInMinute.Minute_Common, excludeParams = {"uid", "udid"})
@SearchCacheAble(cacheName = "WEB_NEW_SHELVE", cacheInMinute = CacheInMinute.Minute_30, excludeParams = {"uid", "udid"})
public SearchApiResult webNewShelveProductList(Map<String, String> paramMap) {
try {
logger.info("[func=aggProductsByBrandId][param={}][begin={}]", paramMap.toString(), System.currentTimeMillis());
... ... @@ -103,7 +101,7 @@ public class WebNewShelveService implements ApplicationEventPublisherAware {
}
}
@SearchCacheAble(cacheName = "WEB_NEW_SHELVE_BATCH", excludeParams = {"uid", "udid"})
@SearchCacheAble(cacheName = "WEB_NEW_SHELVE_BATCH",cacheInMinute = CacheInMinute.Minute_30, excludeParams = {"uid", "udid"})
public SearchApiResult webNewShelveBatchProductList(Map<String, String> paramMap) {
try {
logger.info("[func=webNewShelvesProductList][param={}][begin={}]", paramMap.toString(), System.currentTimeMillis());
... ...
... ... @@ -141,7 +141,7 @@ public class WebProductListService extends AbstractCacheComponent<JSONObject> {
@Override
protected int cacheTimeInMinute() {
return CacheTimeConstants.CACHE_COMMON_MINUTE;
return CacheTimeConstants.CACHE_WEB_MINUTE;
}
@Override
... ...