Authored by 张帅

清理前台缓存

@@ -513,6 +513,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ @@ -513,6 +513,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
513 grassArticleLabel.setAuthStatus(authStatus);//审核状态 513 grassArticleLabel.setAuthStatus(authStatus);//审核状态
514 grassArticleLabelDao.updateByPrimaryKeySelective(grassArticleLabel); 514 grassArticleLabelDao.updateByPrimaryKeySelective(grassArticleLabel);
515 logger.info("updateArticle changeAuthStatus success! req={}",req); 515 logger.info("updateArticle changeAuthStatus success! req={}",req);
  516 + clearArticleNewCache(req.getArticleId());
516 } 517 }
517 518
518 //定时发布 519 //定时发布
@@ -1360,6 +1361,14 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ @@ -1360,6 +1361,14 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
1360 grassRefreshCacheService.refreshGrassCache(cacheReq); 1361 grassRefreshCacheService.refreshGrassCache(cacheReq);
1361 } 1362 }
1362 1363
  1364 + private void clearArticleNewCache(Integer articleId){
  1365 + logger.info("clearArticleNewCache, type=1002");
  1366 + GrassCacheReq cacheReq = new GrassCacheReq();
  1367 + cacheReq.setClearCode(1004);
  1368 + cacheReq.setElementId(String.valueOf(articleId));
  1369 + grassRefreshCacheService.refreshGrassCache(cacheReq);
  1370 + }
  1371 +
1363 private void clearArticleBlockCache(Integer articleId){ 1372 private void clearArticleBlockCache(Integer articleId){
1364 logger.info("clearArticleListCache, type=1001"); 1373 logger.info("clearArticleListCache, type=1001");
1365 GrassCacheReq cacheReq = new GrassCacheReq(); 1374 GrassCacheReq cacheReq = new GrassCacheReq();