admin
2019-06-13 22a5179fbf4aed13dae767aff93d9ca047cba369
增加通用模板缓存
3个文件已修改
63 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/dto/common/CommonContentResult.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/ehcache.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/common/CommonContentResult.java
@@ -1,10 +1,12 @@
package com.yeshi.fanli.dto.common;
import java.io.Serializable;
import java.util.List;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
public class CommonContentResult {
public class CommonContentResult implements Serializable {
    private static final long serialVersionUID = 1L;
    private List<TaoBaoGoodsBrief> goodsList;
    private long count;
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java
@@ -6,6 +6,7 @@
import javax.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dto.common.CommonContentNav;
@@ -77,6 +78,9 @@
        return navList;
    }
    @Cacheable(value = "commonContentCache", key = "#type+'-'+#cid+'-'+#page+'-'+#pageSize")
    @Override
    public CommonContentResult getContentList(CommonContentTypeEnum type, String cid, int page, int pageSize) {
        if (type == CommonContentTypeEnum._9k9)
fanli/src/main/resource/ehcache.xml
@@ -121,79 +121,86 @@
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
    <!-- dos拦截 -->
    <!-- dos拦截 -->
    <cache name="rsCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
    <!-- 淘客推荐模块商品缓存 -->
    <cache name="taoKeMaterialCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!-- 淘客物料搜索缓存 -->
    <cache name="searchWuLiaoCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!-- 9.9/19.9/29.9/49.9模块商品缓存 -->
    <cache name="quality9K9Cache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!-- 精选库商品查询缓存 -->
    <cache name="qualityCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!-- 标签缓存 -->
    <cache name="labelCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!-- 淘宝推荐物料id -->
    <cache name="taobaoMeterialCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!-- 混合分类查询缓存 -->
    <cache name="mergeClassCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!-- 混合分类查询缓存 -->
    <cache name="helpCenterCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!-- 双11缓存 -->
    <cache name="s11Cache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        <!-- 系统自定义券缓存 -->
        memoryStoreEvictionPolicy="LRU" />
    <!-- 系统自定义券缓存 -->
    <cache name="systemCouponCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        <!--品牌缓存 -->
        memoryStoreEvictionPolicy="LRU" />
    <!--品牌缓存 -->
    <cache name="brandCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!--动态缓存 -->
    <cache name="dynamicCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
        memoryStoreEvictionPolicy="LRU" />
    <!--通用模板内容缓存 -->
    <cache name="commonContentCache" maxElementsInMemory="1000"
        maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
        timeToLiveSeconds="120" overflowToDisk="true"
        memoryStoreEvictionPolicy="LRU" />
</ehcache>