将getSelectionsForPcCache的缓存拆分出来
Showing
3 changed files
with
25 additions
and
3 deletions
@@ -113,7 +113,29 @@ public class SearchCacheFactory { | @@ -113,7 +113,29 @@ public class SearchCacheFactory { | ||
113 | int cacheInMinute = 15; | 113 | int cacheInMinute = 15; |
114 | return this.getOrCreateSearchCache("AGGREGATION", cacheType, cacheInMinute); | 114 | return this.getOrCreateSearchCache("AGGREGATION", cacheType, cacheInMinute); |
115 | } | 115 | } |
116 | - | 116 | + |
117 | + /** | ||
118 | + * 获取聚合相关的缓存[yoho_redis with 30 min] | ||
119 | + * | ||
120 | + * @return | ||
121 | + */ | ||
122 | + public SearchCache getSelectionsForAppCache() { | ||
123 | + CacheType cacheType = CacheType.YOHO_REDIS; | ||
124 | + int cacheInMinute = 30; | ||
125 | + return this.getOrCreateSearchCache("SELECTIONS_APP", cacheType, cacheInMinute); | ||
126 | + } | ||
127 | + | ||
128 | + /** | ||
129 | + * 获取聚合相关的缓存[yoho_redis with 30 min] | ||
130 | + * | ||
131 | + * @return | ||
132 | + */ | ||
133 | + public SearchCache getSelectionsForPcCache() { | ||
134 | + CacheType cacheType = CacheType.YOHO_REDIS; | ||
135 | + int cacheInMinute = 30; | ||
136 | + return this.getOrCreateSearchCache("SELECTIONS_PC", cacheType, cacheInMinute); | ||
137 | + } | ||
138 | + | ||
117 | /** | 139 | /** |
118 | * 推荐相关的缓存[yoho_redis with 30min] | 140 | * 推荐相关的缓存[yoho_redis with 30min] |
119 | * | 141 | * |
@@ -63,7 +63,7 @@ public class SelectionForAppImpl implements ISelectionsForApp { | @@ -63,7 +63,7 @@ public class SelectionForAppImpl implements ISelectionsForApp { | ||
63 | 63 | ||
64 | @PostConstruct | 64 | @PostConstruct |
65 | void init() { | 65 | void init() { |
66 | - aggregationSearchCache = searchCacheFactory.getAggregationSearchCache(); | 66 | + aggregationSearchCache = searchCacheFactory.getSelectionsForAppCache(); |
67 | } | 67 | } |
68 | 68 | ||
69 | @Override | 69 | @Override |
@@ -72,7 +72,7 @@ public class SelectionsForPcImpl implements ISelectionsForPc { | @@ -72,7 +72,7 @@ public class SelectionsForPcImpl implements ISelectionsForPc { | ||
72 | 72 | ||
73 | @PostConstruct | 73 | @PostConstruct |
74 | void init() { | 74 | void init() { |
75 | - aggregationSearchCache = searchCacheFactory.getAggregationSearchCache(); | 75 | + aggregationSearchCache = searchCacheFactory.getSelectionsForPcCache(); |
76 | } | 76 | } |
77 | 77 | ||
78 | 78 |
-
Please register or login to post a comment