| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "dynamicCache", key = "'count-'+#cid+'-'+#subId")
|
| | | public long count(Long cid, Long subId) {
|
| | | return dynamicInfoDao.count(cid, subId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "dynamicCache", key = "'query-'+#start+'-'+#count+'-'+#cid+'-'+#subId")
|
| | | public List<DynamicInfo> query(int start, int count, Long cid, Long subId) {
|
| | | List<DynamicInfo> list = dynamicInfoDao.query(start, count, cid, subId);
|
| | |
|
| | |
| | | */
|
| | | public void insertInviteMaterial(String content, String picUrl, Long activityId, ActivityUser activityUser);
|
| | |
|
| | | void insert(DynamicInfo record);
|
| | | public void insert(DynamicInfo record);
|
| | |
|
| | | public long count(Long cid, Long subId);
|
| | |
|
| | |
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | |
| | | <!--动态缓存 -->
|
| | | <cache name="dynamicCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | </ehcache>
|